Google Maps : Show Map Via Address
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.
精彩评论