Google Maps WMS Server

PLEASE NOTE: Google have changed the method in which this works, and my original code does not appear to work as it did initially. I am no longer supporting this software. See the bottom of this document for other implementations and source code.


As I was looking for a new exciting side-project I came across, a community based vector mapping project. JOSM is the main GUI for generating content. I noticed that there were several plugins, one called WMSPlugin looked interesting. It could download data from external WMS image servers, usually satellite imagery. I had been playing with Google Mapping API, and thought that it would be cool if I could get the Google Maps to popup under the OSM vector data.

Solution: Google Maps WMS Server

This is a WMS service that will return image data from Google Maps. The service translates a bounding box request and requests, scales and returns a Google Map image.

Please note: This can only retrieve the mapping data, not the satellite images. I get about 10 emails a week asking whether this is possible. Only the mapping data is available from the API that is used in Google WMS.

Even though this service could be run on a public server, it would use a heap of bandwidth. Unfortunately I don't have the resources to do this. I suggest starting the server locally when required. (You'll need at least Java 1.5 to run this, as it uses Non-Blocking IO network connections).

  • Download the Jar file here: GoogleWMS.jar (Current Version: 1.1)

  • Just run this file on the server from the command line using:
    java -jar GoogleWMS.jar
    The service will start on port 8998.

  • WMS Clients can now connect on:

  • For use in JOSM, Put the WMS server entry in your WMS Plugin preferences.

    Please Note: The newer version of GoogleWMS will require you to put a "?request=GetMap" mark on the end of the URL in JOSM. eg. http://localhost:8998/?request=GetMap

    After that you can request the WMS image data from the WSM menu as usual.

  • I have recieved information from several people saying they have had mixed success with other GIS applications. The sourceforge branch of the code now includes some capabilities code that should make it more compatible across GIS applications.

  • It's been a year since I've done anything with Google WMS, but I still get so much hate-mail about this service.. Here's what they want me to say.. "Adhere to the Google Maps terms and conditions and don't trace data into Open Street Map.."

  • People occasionally send me their own implementations of a Google WMS server. Cris Pond has sent me this PHP implemenation: Google WMS PHP

Source Code

I have created a sourceforge project for this at:

Created: October 17, 2007

Last updated: April 14, 2011

Back to