开发者

Google Maps : Show Map Via Address

开发者 https://www.devze.com 2022-12-31 05:34 出处:网络
I have this Code To show map on a page var _map = new GMap2($get(\"gmap\")); var _latLng = new GLatLng(lat, lng);

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 m开发者_如何学Carker = new GMarker(_latLng);
_map.addOverlay(marker);

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


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.

0

精彩评论

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