Giter Club home page Giter Club logo

cartographer's People

Contributors

infinityrobot avatar joshuamiller avatar nicinabox avatar parolkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cartographer's Issues

cartographer on heroku

Hi there - I have seen mention of some issues regarding heroku on stackoverflow but no obvious fix. I am running the gem locally and all is well - but as soon as I deploy to heroku it bails - checking the logs, the error is as follows:

NameError (uninitialized constant PagesController::Cartographer):
2011-02-20T13:56:26-08:00 app[web.1]: app/controllers/pages_controller.rb:39:in initialize_map' 2011-02-20T13:56:26-08:00 app[web.1]: app/controllers/pages_controller.rb:3:inindex'

...is there a fix for this in the pipeline? Great gem!

Errors and Missing Info in README File

The examples in the readme are too brief and also do not work.

  1. No mention of the use of cartographer-config.yml to be placed in the config directory
  2. No examples setting the centre of the map explicitly, which to me is a basic first example

e.g.
@Map = Cartographer::Gmap.new( 'map' )
@map.zoom = 4
@map.center = [-40,174]
@map.debug = true

  1. The example with markers fails, because the default icon is not an icon object, but the symbol :normal. When the name instance variable is evaluated when creating the javascript for the marker, failure occurs. Fix to README:
@map = Cartographer::Gmap.new( 'map' )
@map.zoom = :bound
@map.debug = true
normal_icon = Cartographer::Gicon.new
@map.icons << normal_icon
marker1 = Cartographer::Gmarker.new(:name=> "taj_mahal", :marker_type => "Building",
          :position => [27.173006,78.042086], :icon => normal_icon,
          :info_window_url => "/url_for_info_content")
marker2 = Cartographer::Gmarker.new(:name=> "raj_bhawan", :marker_type => "Building",
          :position => [28.614309,77.201353],
          :icon => normal_icon,
          :info_window_url => "/url_for_info_content")

@map.markers << marker1
@map.markers << marker2

DEPRECATION WARNING

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb.

Hi Joshua. Can you please tell me what is the best way to deal with this? Thanks, Abram

NameError (uninitialized constant CouponsController::Cartographer):

Hi, I am not sure if this is a bug or something I am missing. I have played around with it and do not see what else it could be.

Env: Rails 3, Ruby 1.8.7

I get the error: NameError (uninitialized constant CouponsController::Cartographer):
When in my production environment(heroku). It works nicely on development on my local machine (OSX). Thank you.

:scroll option, bad init

@scroll = opts[:scroll] || true

if opts[:scroll] is false, then @scroll will be true, not what we want ;) Should default to false.

Also, the option you should pass to init the map is "scrollwheel", and not "scrollWheel".

How to draw a fix-size circle on a map in cartographer

I'd like to draw a fixed size 3 mile circle around a point in cartographer. I looked for the DrawCircle class from the Google API, but could not find it. How do you recommend drawing a fixed-size circle around a point in Cartographer?

undefined method `name' for :normal:Symbol

Rails 3
Ruby 1.9.2

Done everything like in example

NoMethodError in Map#index
~/app/views/map/index.html.haml where line #2 raised:
undefined method `name' for :normal:Symbol

Extracted source (around line #2) (HAML):
1: = raw Cartographer::Header.new.to_s
2: = raw @map.to_html

Trace:
vendor/plugins/cartographer/lib/v3/cartographer/gmarker.rb:57:in to_js' vendor/plugins/cartographer/lib/v3/cartographer/gmap.rb:174:inblock in to_js'
vendor/plugins/cartographer/lib/v3/cartographer/gmap.rb:173:in each' vendor/plugins/cartographer/lib/v3/cartographer/gmap.rb:173:into_js'
vendor/plugins/cartographer/lib/v3/cartographer/gmap.rb:88:in to_html' app/views/map/index.html.haml:2:in_app_views_map_index_html_haml___869769418_90224840_303366198'
actionpack (3.0.3) lib/action_view/template.rb:135:in block in render' activesupport (3.0.3) lib/active_support/notifications.rb:54:ininstrument'
actionpack (3.0.3) lib/action_view/template.rb:127:in render' actionpack (3.0.3) lib/action_view/render/rendering.rb:59:inblock in _render_template'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in block in instrument' activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:ininstrument'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in instrument' actionpack (3.0.3) lib/action_view/render/rendering.rb:56:in_render_template'
actionpack (3.0.3) lib/action_view/render/rendering.rb:26:in render' haml (3.0.25) lib/haml/helpers/action_view_mods.rb:13:inrender_with_haml'
actionpack (3.0.3) lib/abstract_controller/rendering.rb:114:in _render_template' actionpack (3.0.3) lib/abstract_controller/rendering.rb:108:inrender_to_body'
actionpack (3.0.3) lib/action_controller/metal/renderers.rb:47:in render_to_body' actionpack (3.0.3) lib/action_controller/metal/compatibility.rb:55:inrender_to_body'
actionpack (3.0.3) lib/abstract_controller/rendering.rb:101:in render_to_string' actionpack (3.0.3) lib/abstract_controller/rendering.rb:92:inrender'
actionpack (3.0.3) lib/action_controller/metal/rendering.rb:17:in render' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:40:inblock (2 levels) in render'
activesupport (3.0.3) lib/active_support/core_ext/benchmark.rb:5:in block in ms' /home/sarunas/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/benchmark.rb:309:inrealtime'
activesupport (3.0.3) lib/active_support/core_ext/benchmark.rb:5:in ms' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:40:inblock in render'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:78:in cleanup_view_runtime' activerecord (3.0.3) lib/active_record/railties/controller_runtime.rb:15:incleanup_view_runtime'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:39:in render' vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb:13:inrender_with_active_scaffold'
actionpack (3.0.3) lib/action_controller/metal/implicit_render.rb:10:in default_render' actionpack (3.0.3) lib/action_controller/metal/implicit_render.rb:5:insend_action'
actionpack (3.0.3) lib/abstract_controller/base.rb:151:in process_action' actionpack (3.0.3) lib/action_controller/metal/rendering.rb:11:inprocess_action'
actionpack (3.0.3) lib/abstract_controller/callbacks.rb:18:in block in process_action' activesupport (3.0.3) lib/active_support/callbacks.rb:460:in_run__362454126__process_action__330680296__callbacks'
activesupport (3.0.3) lib/active_support/callbacks.rb:409:in _run_process_action_callbacks' activesupport (3.0.3) lib/active_support/callbacks.rb:93:inrun_callbacks'
actionpack (3.0.3) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in block in instrument' activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:ininstrument'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in instrument' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:29:inprocess_action'
actionpack (3.0.3) lib/action_controller/metal/rescue.rb:17:in process_action' actionpack (3.0.3) lib/abstract_controller/base.rb:120:inprocess'
actionpack (3.0.3) lib/abstract_controller/rendering.rb:40:in process' actionpack (3.0.3) lib/action_controller/metal.rb:138:indispatch'
actionpack (3.0.3) lib/action_controller/metal/rack_delegation.rb:14:in dispatch' actionpack (3.0.3) lib/action_controller/metal.rb:178:inblock in action'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:in call' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:indispatch'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:27:in call' rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:inblock in call'
rack-mount (0.6.13) lib/rack/mount/code_generation.rb:93:in block in recognize' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:68:inoptimized_each'
rack-mount (0.6.13) lib/rack/mount/code_generation.rb:92:in recognize' rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:incall'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:492:in call' haml (3.0.25) lib/sass/plugin/rack.rb:41:incall'
warden (1.0.3) lib/warden/manager.rb:35:in block in call' warden (1.0.3) lib/warden/manager.rb:34:incatch'
warden (1.0.3) lib/warden/manager.rb:34:in call' actionpack (3.0.3) lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:in call' rack (1.2.1) lib/rack/methodoverride.rb:24:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:in call' actionpack (3.0.3) lib/action_dispatch/middleware/flash.rb:182:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/session/abstract_store.rb:149:in call' actionpack (3.0.3) lib/action_dispatch/middleware/cookies.rb:295:incall'
activerecord (3.0.3) lib/active_record/query_cache.rb:32:in block in call' activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:incache'
activerecord (3.0.3) lib/active_record/query_cache.rb:12:in cache' activerecord (3.0.3) lib/active_record/query_cache.rb:31:incall'
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in call' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:46:inblock in call'
activesupport (3.0.3) lib/active_support/callbacks.rb:415:in _run_call_callbacks' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:incall'
rack (1.2.1) lib/rack/sendfile.rb:107:in call' actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in call' railties (3.0.3) lib/rails/rack/logger.rb:13:incall'
rack (1.2.1) lib/rack/runtime.rb:17:in call' activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:incall'
rack (1.2.1) lib/rack/lock.rb:11:in block in call' <internal:prelude>:10:insynchronize'
rack (1.2.1) lib/rack/lock.rb:11:in call' actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:incall'
railties (3.0.3) lib/rails/application.rb:168:in call' railties (3.0.3) lib/rails/application.rb:77:inmethod_missing'
railties (3.0.3) lib/rails/rack/log_tailer.rb:14:in call' rack (1.2.1) lib/rack/content_length.rb:13:incall'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in service' /home/sarunas/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/webrick/httpserver.rb:111:inservice'
/home/sarunas/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/webrick/httpserver.rb:70:in run' /home/sarunas/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/webrick/server.rb:183:inblock in start_thread'

[Delete Please]

I solved my own issue.
[Delete Please]

I would have deleted it myself but cannot. Sorry about the inconvenience.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.