开发者

Get latitude and longitude for map click

Can anybody tell me that how can I get latitude and longitude of a location wh开发者_运维百科en clicking on map?


You could try changing this to suite your needs: http://www.iphonedevsdk.com/forum/tutorial-discussion/39374-mkmapview-tutorial-using-latitude-longitude.html


Try google maps v3 api. Add an event listener to click and you can get latitide/longitude pretty easily. Ex:

google.maps.event.addListener(map, 'click', function(event) {
    YourHandler(event.latLng);
});

event.latLng automatically gets the longitude and latitude of the location you clicked on

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜