Displaying 10 results from an estimated 10 matches for "info_window".
2006 Nov 02
2
Update map
...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.00005], :title => "Update",
:info_window => "I have been placed through RJS")
end
my index.rhtml:...
2007 Nov 05
1
marker event listeners
...use them until the above is addressed).
Index: lib/gm_plugin/overlay.rb
===================================================================
--- lib/gm_plugin/overlay.rb (revision 97)
+++ lib/gm_plugin/overlay.rb (working copy)
@@ -25,11 +25,13 @@
end
#Creates a marker: If an info_window or info_window_tabs is
present, the response to the click action from the user is setup here.
def create
- if @options.empty?
- creation = "new
GMarker(#{MappingObject.javascriptify_variable(@point)})"
- else
- creation = "new
GMarker(#{Mapp...
2007 Oct 16
3
can''t define custom GIcon
...ot;)
infoString = "Friendly Name: "+result.friendly_name+
"<br/>MAC: "+result.mac.to_s+
"<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 ha...
2008 Mar 14
0
problem with rjs and marker group
...yWord.stat_description(site.status_sensor.last_value)[0])]
# create the icon image ( the pivot circle )
icon = GIcon.new(:image => "/images/tmp/#{site.id}.png",
:icon_size => GSize.new((r*2),(r*2)),
:icon_anchor => GPoint.new(r,r),
:info_window_anchor => GPoint.new(r,r))
# place the marker on the map
marker = GMarker.new([site.map_stat.lat.to_f ,
site.map_stat.long.to_f],
:title => title, :icon => icon, :info_window => text)
_all_markers[i] = marker
end
retu...
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
...;')
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, :max_visible_markers => 2)
session[:gmap].overlay_init(clusterer)
Then in my view I''m loading in the requisite javascript libraries,
including clusterer and mapstraction,...
2007 Oct 17
0
GMarkerGroup center_and_zoom_on_markers problem
Hi,
I found the funcitoned mentioned in title (center_and_zoom_on_markers) but
am having troubles getting it working.
I have several markers being added to an array (@gmap_markers = []) in the
following manner:
marker = GMarker.new(latlng, :info_window => infoString, :icon => my_icon)
@gmap_markers << marker
I am then trying to do the following:
group = GMarkerGroup.new(true, @gmap_markers)
@map.overlay_global_init(group,"NOI")
@map.record_init group.center_and_zoom_on_markers
But I get the following error: this.v has no...
2007 Mar 04
0
Event listeners
...es(@code_postal << ", france")
@adresses.each do |marker|
@latitude = 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, "...
2008 Jan 26
0
Error: no such file to load -- geokit (plugin is install)
...clude 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 the map in
the view via:
<html>
<head>
<%= GMap.header %>
<%= @map.to_html %>...
2008 Mar 04
0
question about updating the map
...update,
here is what draws the markers
text = "<strong>some text for the marker balloons</strong>"
icon = GIcon.new(:image => "/images/tmp/#{site.id}.png", :icon_size =>
GSize.new((r*2),(r*2)),
:icon_anchor => GPoint.new(r,r),
:info_window_anchor => GPoint.new(r,r))
marker = GMarker.new([site.map_stat.lat.to_f , site.map_stat.long.to_f],
:title => title, :icon => icon, :info_window => text)
the #{site.id},png is the image drawn earlier by RMagick. That is the
main thing i want to update.
than...