gmaps4rails V2 を使用していますが、マーカーの位置を取得できません。
私はマーカーの配列を持っています:
markers = handler.addMarkers(<%=raw @hash.to_json %>);
それを繰り返して、マップの境界からマーカーを削除したい
$.each markers, ->
pos = this.getPosition
if !bounds.contains pos
handler.removeMarker this
これは私のコンソール出力です:
Uncaught TypeError: Object #<Marker> has no method 'getPosition'
何か不足していますか?