Download google china maps by MapTileFE
Posted on 2010-04-29 21:31 Happy Coding 阅读(818) 评论(0) 编辑 收藏 举报#1: Download google china maps by MapTileFE Author: ansonsyc, Posted: Fri Jan 09, 2009 5:51 am
—
Can anyone tell me how to keep download the google china map?
I can download others google maps, but need to change my PC ip address every 5mins. Otherwise, its not workable.
But I tired many times to download google china map but failed. Kindly please advise any way for me.
Thanks a lot~~!
![Post Post](http://forum.mgmaps.com/templates/subSilver/images/icon_minipost.gif)
—
The google china (ditu.google.cn) have upgraded their service interface. And the request parameter format have also been changed.
You may use the attached file to replace the official MapTileCacher.perl. It is based on the Map Tile Cacher v1.36. Just replace the original file, prepare your map define file and start download. I haven't meet download limitation when use GoogleChina map type.
If you want to update the MapTileCacher.perl file yourself, here is the instruction. The change is simple. Just find the line in the original perl file:
Code: |
$url = "http://mt" . (($x+$y)&3) . ".google.cn/mt/v=cn1.6&hl=en&x=$x&y=$y&z=$zoomLevel"; |
and replace it to
Code: |
$url = "http://mt" . (($x+$y)&3) . ".google.cn/mt?v=cn1.7&hl=zh_CN&x=$x&y=$y&z=$zoomLevel"; |
MapTileCacher.perl | |||
Description: |
|
![]() Download |
|
Filename: | MapTileCacher.perl | ||
Filesize: | 21.39 KB | ||
Downloaded: | 244 Time(s) |
![Post Post](http://forum.mgmaps.com/templates/subSilver/images/icon_minipost.gif)
—
miles wrote: | ||||
The google china (ditu.google.cn) have upgraded their service interface. And the request parameter format have also been changed. You may use the attached file to replace the official MapTileCacher.perl. It is based on the Map Tile Cacher v1.36. Just replace the original file, prepare your map define file and start download. I haven't meet download limitation when use GoogleChina map type. If you want to update the MapTileCacher.perl file yourself, here is the instruction. The change is simple. Just find the line in the original perl file:
and replace it to
|
I am using gmapmaker 0.7.2.2. Could you please instruct me how to modify the gmapmaker.exe.config file to reflect your modifications? Thanks.
![Post Post](http://forum.mgmaps.com/templates/subSilver/images/icon_minipost.gif)
—
miles wrote: | ||||
The google china (ditu.google.cn) have upgraded their service interface. And the request parameter format have also been changed. You may use the attached file to replace the official MapTileCacher.perl. It is based on the Map Tile Cacher v1.36. Just replace the original file, prepare your map define file and start download. I haven't meet download limitation when use GoogleChina map type. If you want to update the MapTileCacher.perl file yourself, here is the instruction. The change is simple. Just find the line in the original perl file:
and replace it to
|
I run your latest MapTileCacher.perl, but still didn't work for me. Here is the error message:
* Downloading tile 1 of 4 from http://mt1.google.cn/mt?v=cn1.7&hl=zh_CN&x=842&y=387&z=10
http://mt1.google.cn/mt?v=cn1.7&hl=zh_CN&x=842&y=387&z=10:
11:14:26 ERROR 404: Not Found.
ERROR: Requested tile did not exist.
The same script works fine with US maps. Any idea why?
![Post Post](http://forum.mgmaps.com/templates/subSilver/images/icon_minipost.gif)
—
cell35 wrote: | ||||||
I run your latest MapTileCacher.perl, but still didn't work for me. Here is the error message: * Downloading tile 1 of 4 from http://mt1.google.cn/mt?v=cn1.7&hl=zh_CN&x=842&y=387&z=10 http://mt1.google.cn/mt?v=cn1.7&hl=zh_CN&x=842&y=387&z=10: 11:14:26 ERROR 404: Not Found. ERROR: Requested tile did not exist. The same script works fine with US maps. Any idea why? |
Try cn1.11 instead of cn1.7, they are changing versions quickly. I mean
Code: |
$url = "http://mt" . (($x+$y)&3) . ".google.cn/mt?v=cn1.11&hl=zh_CN&x=$x&y=$y&z=$zoomLevel"; |
![Post Post](http://forum.mgmaps.com/templates/subSilver/images/icon_minipost.gif)
—
Cristian Streng wrote: | ||||||||||
Try cn1.11 instead of cn1.7, they are changing versions quickly. I mean
|
Thank you Cristian, the version 1.11 works now.
![Post Post](http://forum.mgmaps.com/templates/subSilver/images/icon_minipost.gif)
—
For gmapmaker users:
You need to edit the gmapmaker.exe.config file accompany with the gmakmaker executable.
Find this line
Code: |
<value>http://mapgoogle.mapabc.com/googlechina/maptile?v=w2.70&x={X}&y={Y}&zoom={ZOOM}</value> |
and replace it with
Code: |
<value>http://mt{GOOG_DIGIT}.google.cn/mt/v=cn1.11&hl=zh-CN&gl=cn&x={X}&y={Y}&z={ZOOM}&s={GALILEO}</value> |
Note google map China update its service quite frequently. It takes only 2 month to upgrade from cn1.7 to cn1.11.
I'll describe how to figure out the suitable url yourself in case of previous modification will soon be outdated. It isn't a so difficult DIY
My suggestion is install Firebug plugin into Firefox. Use Firefox to access google maps China. http://ditu.google.cn. When the google map is displayed, just open the Firebug panel, select 'Net' tab, you will find a lot of downloaded tiles (just hover on the GET request, you will see the url and 256X256 map tile thumbnail). Right click and select "Copy Location". The url will be sent to clipboard. Paste the url into your gmapmaker.exe.config editor window and start modify! The url should like this:
Code: |
http://mt0.google.cn/mt/v=cn1.11&hl=zh-CN&gl=cn&x=27436&s=&y=13400&z=15&s=Gali |
Just change every "&" into "&" (in XML preferred style), and replace the fixed parts into dynamic macros, please refer to the previous example.[/url]