In the offline version of GoogleMap API V3, you can still use the Google map service without calling GoogleMap javascrui online.
Google map's last license application in China has passed, and there are still no official instructions. It is very likely that Google map will be suspended in May July, this is a great sorrow for those of us who often use Google maps or secondary developers!
This may be a good thing for map service providers in China. More cakes can be divided. However, for our users, especially map applications developed using the free GoogleMap API in many enterprises and websites, it is a challenge and can only be replaced with other map servers, regardless of whether the service is charged or not, you need to re-develop the service if you switch from the platform. Is there a way for us to continue using it after Google leaves us? I think of the offline version of the previously created Google map API. With this, we can place it on our own server, instead of calling these scripts from the Google map server. Of course, I still want you to use the official version for commercial purposes. Pay attention to copyright issues.
Some time ago, I made a Google Map API V3 offline version. After testing, the basic functions should be satisfied. You can download and try it.
Yes: googlemapapiv3.zip
After using the offline version, you only need to load the mapapi. js file, for example:
<! Doctype html >
< Html >
< Head >
< Meta Name = "Viewport" Content = "Width = device-width, initial-scale = 1.0, user-scalable = No" />
< Meta HTTP-equiv = "Content-Type" Content = "Text/html; charsets = UTF-8" />
< Link Href = "Http://code.google.com/apis/maps/documentation/javascript/examples/default.css" REL = "Stylesheet" Type = "Text/CSS" />
< Title > Google Maps javascript API V3 example: Map simple </ Title >
< Script Type = "Text/JavaScript" SRC = "Mapapi. js" > </ Script >
< Script Type = "Text/JavaScript" >
Function Initialize (){
VaR Mylatlng = New Google. Maps. latlng ( - 34.397 , 150.644 );
VaR Myoptions = {
Zoom: 8 ,
Center: mylatlng,
Maptypeid: Google. Maps. maptypeid. Roadmap
}
VaR Map = New Google. Maps. Map (document. getelementbyid ( " Map_canvas " ), Myoptions );
}
</ Script >
</ Head >
< Body Onload = "Initialize ()" >
< Div ID = "Map_canvas" > </ Div >
</ Body >
</Html>
If you are interested, you can test it. If you find any problems, we can try to solve them together.