I get the api key from this url:
http://code.google.com/intl/vi-VN/apis/maps/signup.html.
I create html include:
//=============================//
<head>
<script type="text/javascript" src="http://maps.google.com/maps?
file=api&amp;v=2&amp;key=ABQIAAAA2jOlOYlyyP9l3Kvy8pY2pRSJ03n5IZ2jFMN6qpkVWl9IPAme0RQRCUvyqazacpvLfvHPmgM54L5Y0Q&sensor=true"></
script>
<script type="text/javascript">
var map = null;
var geocoder = null;
function initialize(address) {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
// map.setCenter(new GLatLng(37.4419, -122.1419), 13);
geocoder = new GClientGeocoder();
showAddress(address);
}
}
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
//
var mapControl = new GMapTypeControl();
if(mapControl !=null){
map.addMapType(G_SATELLITE_3D_MAP);
map.addControl(mapControl);
//map.setMapType(G_SATELLITE_3D_MAP);
}
//
map.setUIToDefault();
marker.openInfoWindowHtml(address);
}
}
);
}
}
</script>
</head>
<body>
<div id="map_canvas" style="width: 99%; height: 350px"></
div>
<script>initialize('74 Nguyễn Cừ, HCM, Việt Nam')</script>
</body>
//=============================//
run local OK. when running on the host failed: "this website need
another api".
Help me!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---