Export large googlemap image by phantomjs
Usage:
-
edit googlemapExample/index.html
Set your google api map key to replace YOUR_API_KEY.
Set width, height, min-height, zoomlevel and so on, adjust to get your target image. Default image config is terrain, no label, road and point. google map style
Make sure you can load the target map in your browser.
-
config phantomjsScript/googlemap.js
set viewport big enough to contain your map
set url to be filepath or url to googlemapExample/index.html
set wait time long enough to full load your page, default is 20 seconds
-
download phantomjs of your OS and run command in terminal, then you can find a png image in your present working directory.
bin/phantomjs your_path_to/phantomjsScript/googlemap.js
warning:
- make sure you can access google map in your terminal env.
- the largest image size is about 6500 * 5000 in zoom level 11, in zoom level 12 and 13000 * 10000 size, map tiles shows only in center, margin is gray.