Google Maps : Show Map Via Address

匿名 (未验证) 提交于 2019-12-03 08:28:06

问题:

I have this Code To show map on a page

var _map = new GMap2($get("gmap")); var _latLng = new GLatLng(lat, lng); _map.setCenter(_latLng, 11); _map.addControl(new GLargeMapControl()); _map.addControl(new GMapTypeControl()); var _icon = new GIcon(G_DEFAULT_ICON); var marker = new GMarker(_latLng); _map.addOverlay(marker); 

But I do Not have GeoCode for Some Address. How can I show Map via Address Only.

回答1:

You use the GeoCoder to get the address into latitude and longitude first, and then use that.

Here's an example of how to geocode an address.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!