S
Sean Shillo
I came across the following code in a class called Marker
def when_dropped
self.listen_to :event => :dragend do |script|
script << "drop_location = #{self.var}.getLatLng();"
yield script, :drop_location
end
end
if i use the function as follows
marker.when_dropped do |script, drop_location|
logger.info(drop_location)
end
all i get is "drop_location". I want drop_location to be evaluated to
get the value from #{self.var}.getLatLng() and I can't seem to find a
way to do this, anyone have any ideas and/or know
what exactly is going on here.
Thanks
def when_dropped
self.listen_to :event => :dragend do |script|
script << "drop_location = #{self.var}.getLatLng();"
yield script, :drop_location
end
end
if i use the function as follows
marker.when_dropped do |script, drop_location|
logger.info(drop_location)
end
all i get is "drop_location". I want drop_location to be evaluated to
get the value from #{self.var}.getLatLng() and I can't seem to find a
way to do this, anyone have any ideas and/or know
what exactly is going on here.
Thanks