Try google map (including source code)

Source: Internet
Author: User

Google's map test version has been released for some time, but I only have time to read it in the past two days. Through simple use, I found that
This service is good. Now I will write down how to apply for the map api key and simple steps. I hope you can see it later.
Help. At the same time, I also found a website where the author loaded all domestic administrative divisions and Cities Based on google Maps.
The function of the figure. The code written by the author is really good. Here I just associate his javaScript script with the image content.
After the modification, the package is put here (it is a waste of flowers). You can add this function to your own program to add these features to your own site,
In addition, I hope everyone will support the author, because there are not many programmers.

Step 1: Go to the http://www.google.com/apis/maps/ and click the Sign up for a Google Maps API key link
Enter the link to the website you want to use (I am using a http://www.imhero.com/map) and click the Generate API Key button.
The page shown in is displayed. Figure 1:

Step 2: Use the following code to create a new file and upload the path of the website link you just used. If you are using
Http://www.imhero.com/map. the ultimate page chain is http://www.imhero.com/map/map1.html. Effect 2:

A simple GoogleMAP example has been basically completed. For more instructions on using the Google Map Api, see
Http://www.google.com/apis/maps/documentation/next.

Because GOOGLE's map is still in BETA version, some functions need to be improved, and the Chinese city map has some problems,
Search to find that someone has already started. The URL is as follows: http://www.step1.cn/map/, and his personal website is http://www.step1.cn/
The following figure shows the map search in Beijing based on the features he developed. 3:

His personal Web http://www.step1.cn, demo map address is http://www.step1.cn/map/

I put some of its code (javascript) here in the example. Other link addresses use absolute links, while the author's
The WEBSERVICE program and ASPX program are not provided, but the author still hopes to open the code after the functions are mature.

Part of the Code (javascript), the demo address after using the code is as follows: http://www.imhero.com/map/map.html

Note:In the map.html file
<Head>
<Script src = "http://maps.google.com/maps? File = api & v = 1 & key = example
K95XPSnV6W0PZz7PYgA "type =" text/javascript "> </script>
</Head>
Some must be replaced with the KEY that GOOGLE gave when you applied for it.

Here we are, and the company's broken project is coming again .......

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.