Google Maps Tutorial
Google Maps Resources
Selected Reading
- Google Maps - Events
- Google Maps - Symbols
- Google Maps - Info Window
- Google Maps - Shapes
- Google Maps - Markers
- Google Maps - UI Controls
- Google Maps - Localization
- Google Maps - Zoom
- Google Maps - Types
- Google Maps - Getting Started
- Google Maps - Home
Google Maps Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Google Maps - Localization
Google Maps - Locapzation
By default, the city names and option names given on the map will be in Engpsh. If required, we can display such information in other languages as well. This process is known as locapzation. In this chapter, we will learn how to locapze a map.
Locapzing a Map
You can customize (locapze) the language of the map by specifying the language option in the URL as shown below.
<script src = "https://maps.googleapis.com/maps/api/js?language=zh-Hans"></script>
Example
Here is an example that shows how to locapze GoogleMaps. Here you can see a roadmap of China that is locapzed to Chinese language.
<!DOCTYPE html> <html> <head> <script src = "https://maps.googleapis.com/maps/api/js?language=zh-Hans"></script> <script> function loadMap() { var mapOptions = { center:new google.maps.LatLng(32.870360, 101.645508), zoom:9, mapTypeId:google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("sample"),mapOptions); } </script> </head> <body onload = "loadMap()"> <span id = "sample" style = "width:580px; height:400px;"></span> </body> </html>
Output
It will produce the following output −
Advertisements