Posto
Posto

Reputation: 7550

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 marker = new GMarker(_latLng);
_map.addOverlay(marker);

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

Upvotes: 2

Views: 8064

Answers (1)

Daniel DiPaolo
Daniel DiPaolo

Reputation: 56418

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.

Upvotes: 4

Related Questions