Google Maps: Show map via address

I have this code. Show map on 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 addresses. How to show the map only by address.

+2
source share
1 answer

You use GeoCoder to first get the address in latitude and longitude, and then use this.

Here is an example of how to geocode an address .

+4
source

All Articles