Reputation: 1124
I've developed an iOS application which is using Google Maps API and is drawing some markers. What I need now is to find the coordinates of every marker drawed on the map view. I tried to find something in the documentation of Google Maps but I don't think that I found what I needed so I would be very happy if I get some help.
Upvotes: 0
Views: 246
Reputation: 5616
The JSON file you are receiving from Google Directions contains the co-ordinates. You just need to loop over the all markers array.
Upvotes: 1
Reputation: 58
you can loop over the allMarkers
array and inside the loop do something like
var lat = homeMarker.getPosition().lat();
var lng = homeMarker.getPosition().lng();
tips:
getPosition()
.Upvotes: 0