4

how to use mapproxy to serve WMS from reprojected google maps tiles, i have searched for docs, but there's no docs which describe how to add google maps as source.

2 Answers 2

6

Technically it is very simple to use Google tiles as source for WMS. You can do this with the following MapProxy config:

services:
  demo:
  tms:
  wms:
    md: 
      title: MapProxy WMS Server

sources:
  gm:
    type: tile
    url: http://mt0.google.com/vt/lyrs=m@0&hl=en&x=%(x)s&y=%(y)s&z=%(z)s
    grid: gm_grid

grids:
  gm_grid:
    base: GLOBAL_MERCATOR
    origin: ul

caches:
  gm_cache:
    grids: [gm_grid]
    sources: [gm]
    cache:
      type: file
      directory_layout: tms

layers:
  - name: gm_layer
    title: Test of using GM tiles
    sources: [gm_cache]

But as mentioned above - you are allowed to access the tiles only through Google API.

3

MapProxy supports WMS sources (1.0.0–1.3.0)& TMS/WMTS sources.

Google does not have an WMS service. It has its own tiles, and according to Google's Terms & Conditions, you are allowed to access the tiles only through their API.

This is why you cannot use MapProxy with Google Maps as a source.

4
  • but from this slide fr.scribd.com/doc/102823641/Mapproxy-Tutorial#page=9 , they said the possibility to add custom tile like google maps tiles.
    – geogeek
    Apr 3, 2013 at 11:00
  • Yes, you can use TMS to cache Google Tiles and then publish them as WMS service, but that would violate Google's TOS, so you should make sure that you can have right for using Google Maps Tiles Apr 4, 2013 at 13:40
  • @VietThanhLe i know that it could violate Google TOS, but I'm trying just to make a personal experiment, but i didn't found how to add google maps as source for custom tiles.
    – geogeek
    Apr 5, 2013 at 9:22
  • 1
    You will need to have tile url, namely the url to a single tile with x/y/x value like this pseudo one: tiles.googlemaps.com{x}/{y}/{z}.png (Use Firebug/Firefox to get the real one), and then you just need read thoroughly MapProxy's documentation to get your task done. Apr 6, 2013 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.