GoogleMapsAPI usage tutorial

Source: Internet
Author: User
In the past year, the development of online maps has been quite huge. we can see the valuable information and capabilities of online maps. The most famous among them is Google Maps .. GoogleMaps is developed by a powerful development engine and has a large community prompt to support Google

In the past year, the development of online maps has been quite huge. we can see the valuable information and capabilities of online maps. Google Maps is the most famous among them .. Google Maps is supported by a powerful development engine and a large community prompt.

Google allows various web masters to use the Google Maps API to add or customize map specific to their site. you may obtain the Google API key from here. A map API key is only valid for one "directory" or domain. The key is bound to your domain name. if you want to put a map on your website, you need a corresponding key. Otherwise, you are not allowed to read the map data. you do not need a key for local testing. Of course, you can apply for multiple API keys.

Create a simple map

Introducing Google Maps on your site is a simple task. you only need to add:

* Introduce Google JavaScript files

* Set JavaScript parameters

* An HTML layer for displaying a map

Google Javascript file introduction:

1.2. charset = "UTF-8"
3. src = http://maps.google.com/maps? File = api & v = 2 & hl = en & oe = UTF-8 & key = API_KEY
4. type = "text/javascript">
5. script

Note: We can change the language. for example, we can change "hl = en" to Chinese "hl = zh-CN ". We have to change "API_KEY" to the one we applied for from Google.

English version (use UTF-8 encoding will be better.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.