search for: center_zoom_init

Displaying 12 results from an estimated 12 matches for "center_zoom_init".

2006 Nov 02
2
Update map
...ym4r-plugin and try to update a map as explained in the README-example... but nothing happens. I can update normal html. Heres my baby-code: class AdminController < ApplicationController def index @map = GMap.new("map_div") @map.control_init(:large_map => true) @map.center_zoom_init([59.91106, 10.72223],16) @map.overlay_init(GMarker.new([59.91122, 10.72217], :title => "Great!", :info_window => "Hi")) render :action => ''index'' end def shift @map = Variable.new("map") @marker = GMarker.new([59.00000, 10....
2007 Oct 16
3
can''t define custom GIcon
..."<br/><br/><a href=''/stats/table''>Table View</a>" marker = GMarker.new(latlng, :info_window => infoString, :icon => "ap_none") point = GLatLng.new(latlng) @gmap_markers << marker @map.center_zoom_init(bounding_box_center(@gmap_markers), 15) @map.overlay_global_init(GMarkerGroup.new(true, @gmap_markers),"NOI") In my view I simply have: <%= @map.div(:width => 600,:height => 400) %> When I don''t define the :icon property in the GMarker constructor, everything w...
2006 Jul 25
1
Blank map?
...d here. The controls for the Google Map show up, but the map itself seems to either never appear or to briefly flicker onto screen, then to disappear. My controller is simply this: @map = GMap.new("map_div") @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([0, 0], 6) and my view is this: <head> <%= javascript_include_tag :defaults %> <%= GMap.header %> <%= @map.to_html %> </head> <body> <h2>Map should be below</h2> <%= @map.div %> </body> Any help greatly appreciated. Mike Penc...
2006 Aug 03
3
Calling/Executing javascript functions from controller
...lter :login_required, :except => [:index, :initialize] def index @session[:mode] = ''view'' @map = GMap.new("map") render :update do |page| page.call("resizeMap") end @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([38.539506, -121.757172],13) store_location end end This as expected does not work, it spits of the try{blah blah} catch stuff. Any help is greatly appreciated! Russ -- Posted via http://www.ruby-forum.com/.
2006 Nov 06
4
Event listeners
Hi! Your plugin is really great! Thanks. One more little question. Is it possible to add event listeners to the maps via your plugin? greetings /till -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ym4r-user/attachments/20061106/6b1c6f4f/attachment.html
2007 Jan 18
1
Clusterer generating javascript syntax error
...'m using Ym4r with the Clusterer. The GMaps code in my controller looks something like this: # geo is an array of lon/lat points session[:gmap] = GMap.new(''map_div'') session[:gmap].control_init(:large_map => true,:map_type => true) session[:gmap].center_zoom_init([38.134557,-95.537109],4) markers = Array.new geodata.each do |geo| markers.push(GMarker.new([geo[''lon''], geo[''lat'']], :info_window => "Hello", :title => "HOYOYO")) end clusterer = Clusterer.new(markers, :...
2007 Oct 17
0
GMarkerGroup center_and_zoom_on_markers problem
....overlay_global_init(group,"NOI") @map.record_init group.center_and_zoom_on_markers But I get the following error: this.v has no properties (on line 611 of main.js, according to Firebug). If I replace the line "@map.record_init group.center_and_zoom_on_markers" with "@map.center_zoom_init(bounding_box_center(@gmap_markers), 9)" everything works as expected. bounding_box_center is just a function I wrote quickly to get the center point of the group of markers. Has anybody else used the center_and_zoom_on_markers method successfully? I''m not sure what the problem is, a...
2007 Mar 04
0
Event listeners
...e = marker[:latitude] @longitude = marker[:longitude] @marker1 = GMarker.new([marker[:latitude],marker [:longitude]], :draggable => "true", :title => "myTitlei", :info_window => "myInfo...") end @map.overlay_init @marker1 @map.center_zoom_init([@latitude, @longitude],16) @map.event_init(@map,:click,"function(){alert(''HOYOYO'');}") # this runs well... testing.. @map.event_init(@marker1, :dragend, "function () { point = marker1.getPoint(); map.setCenter(point); map.savePosition(); GLog.writ...
2008 Jan 26
0
Error: no such file to load -- geokit (plugin is install)
...ller < ApplicationController require ''geokit'' require ''ym4r_gm'' include ym4r_gm::GoogleMaps include GeoKit::Geocoders def index @map = GMap.new("map_div") @map.control_init(:large_map => true,:map_type => true) @map.center_zoom_init([75.5,-42.56],4) #@map.overlay_init(GMarker.new([75.6,-42.467],:title => "Hello", :info_window => "Info! Info!")) end 75.5,-42.56 should be the data for the map. In the next step I want to initiate a map. For this, so far I get it from the tutorial, I have to call th...
2008 Mar 14
0
problem with rjs and marker group
..._main_layout @zoom = params[:zoom].to_i @zoom = 14 if params[:zoom].nil? @map = GMap.new("map_div") # @map.control_init(:large_map => true, :map_type => true) # (inserts map control) # place the map where we want it ( center and zoom level ) @map.center_zoom_init([@group.group_map_stat.lat.to_f, @group.group_map_stat.long.to_f], @zoom) @map.set_map_type_init(GMapType::G_HYBRID_MAP) @sites = @group.sites @sites.each do |site| # draw the circles site.map_stat.circle_image(@zoom) end @all_markers = make_map_markers...
2006 Aug 03
0
N00b question...but here it goes
...gin_required, :except => [:index, :initialize] def index @session[:mode] = ''view'' @map = GMap.new("map") render :update do |page| page.call("resizeMap") end @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([38.539506, -121.757172],13) store_location end end This as expected does not work, it spits of the try{blah blah} catch stuff. Any help is greatly appreciated! Russ -- Posted via http://www.ruby-forum.com/.
2007 Mar 09
0
Clusterer
...:grid_size => 10, :min_markers_per_cluster => 2, :max_lines_per_info_box => 10, :icon => icons[2]) @map.overlay_init(clusterer) @marker_myself = GMarker.new ([@user.user_lat, at user.user_lng], :title => @user.pseudo) @map.center_zoom_init([@user.user_lat, @user.user_lng],zl) @map.overlay_init(@marker_myself) here is the generated script (with the line numbers) <script type="text/javascript"> 161 var icon_contact = addOptionsToIcon(new GIcon(),{image : "/images/ gm_contact.png",iconAnchor : new...