Just like you visit maps.google.com.tw
or maps.google.co.kr
or maps.google.co.jp
, you can see their own language shown on every country. Is there any property that I can use in Google Maps API to dynamically set google maps using specific language to display?
views:
184answers:
1
+2
A:
You can add an optional hl
parameter to the <script>
tag when including the Google Maps API, specifying the domain language to use, as in the following example:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Localization of the Google Maps API</title>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&hl=ko"
type="text/javascript"></script>
</head>
<body onunload="GUnload()">
<div id="map_canvas" style="width: 400px; height: 300px"></div>
<script type="text/javascript">
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(36.48, 128.00), 7);
map.setUIToDefault();
</script>
</body>
</html>
Screenshot:
You may also want to check out the following resources for further reading:
Daniel Vassallo
2010-04-18 17:08:11
Thanks for the quick and accurate response.
Matt
2010-04-19 10:27:57
After I test, in v3, language "hl" parameter doesn't support yet.
Matt
2010-05-15 15:00:59