Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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 '13 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 –  VietThanh Le Apr 4 '13 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 '13 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. –  VietThanh Le Apr 6 '13 at 2:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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