I'm using gmaps4rails V2 and and I'm not able to retrieve the markers position.
I have my array of Markers:
markers = handler.addMarkers(<%=raw @hash.to_json %>);
I want to iterate over it and delete the marker out of my map bounds
$.each markers, ->
pos = this.getPosition
if !bounds.contains pos
handler.removeMarker this
This is my console output:
Uncaught TypeError: Object #<Marker> has no method 'getPosition'
Am I missing something?