21 Februari 2012:
I removed this project because I got asked by Google to remove the functionality which made it possible to download the tiles from Google Maps. May be sometime in the future I might re-iniate the project to provide the possibility to use openstreetmaps, but currently I have no such plans.
13 Februari 2010:
I will NOT be answering any more remarks or questions posted on the bottom of this page. Somehow they get completely mixed up and the order of questioning and answering is no longer coorectly maintained.
For any questions or remarks you can use the Discussions page on the Codeplex project page
We all wanted to do this at some time: be able to save the tiles of google maps on your computer for offline viewing.
I was first planning on implementing an Internet Explorer plug-in which would capture the URL’s of all the images in the page your viewing and then allow you to download selected images. But then I read this codeproject article explaining how to get the tiles by using the longitude and lattitude of a world-location.
And then it started expanding…
The GUI provides following functionality:
- Tile viewing functionality
- Navigate to a certain point by providing a name
- View tiles served by Open Street Maps (thanks to Michael Collinson)
- View tiles served by Google Maps
- Set the type of tile you want to view
- Zoom in and out of this point
- Drag the map to reveal neighbouring tiles or simply put: panning functionality.
- Ripping functionality
- Set a ripping radius
- Set a ripping zoom level
- Set the tile-type you want to download
- Provide a path along which to download all the tiles
- GPS functionality
- Find your position using a GPS
- Trace a route on the map and save it
- Display a previously saved trace
- Import a bitmap and split it in tiles
Following is a small manual on how to use the desktop application.
Starting a new project
When you open the application you must first start a new project. You do this by selectinh the “New” menu item under the “File” menu. After selecting this a new Tile Explorer window is opened. This window allows you to view the tiles from a source. It will be explained in more detail later on. But first, you must select a source for your tiles.
Selecting a source for your tiles: the Servers tab
When you select the Server tab you have the chance to select the source for your tiles by adding a tile server of your choice. Just click the Add-button and a window will show with the available servers. Select a server by it’s name and press the Select button.
Depending on the type of server selected, on the Server tab some controls will be added allowing you to configure the server of your choice.
Viewing tiles from online tileservers: the Online Maps area
Viewing tiles from Google maps and OpenStreetMaps requires no additional data.
For viewing files downloaded to your computer you must provide following data:
- The name of the folder where the tiles are saved.
For viewing tiles you must provide following data
- First, select the type of tile and the zoomfactor of those tiles.
- Second, type in a location in the “location” textbox and hit the Enter key
- If multiple locations correspond with the text you gave, the combobox is filled with those locations and you can select one of them.
If everything went right, you should see the tiles served by the selected server in the viewing area. Depending of the type of tile selected, these will be Map or Satelite tiles. You have to be a bit patient if the user interface locks up because the retrieving of the tiles is done in the user interface thread.
Next you can hold the left button mouse down on the viewing area and drag the mouse to pan the tiles. Again, the interface might block so be patient.
For viewing tiles you downloaded, you must provide the exact same type of tile and zooming level as used for downloading them (see further). You must also provide an inital location. If you are completely offline you can use the Geocoder menu item for this. While you are online type in a location and save it by selecting the Geocoder -> Set as home menu item. To provide an inital location use the Geocoder -> Goto Home menu item. This will initialize the view on the previously saved Home location.
The Window menu allows you to expand the tileview to fullscreen mode. Pressing the Escape key switches back to normal view.
Additional functionality: the Layers tab
If you look at the Layers tab you will also see the ability to add layers to the application thus providing additional functionality.
Currently following layers are provided:
- Ripping layer: adds the ability to download tiles to of selected folder
- Routing layer: adds the ability to trace a route on the maps and save or load that route
- GPS Layer: adds the ability to show where you are using a GPS antenna
Downloading tiles from Google Maps to your computer: the Google Ripping layer
This is actually why I started this project: to be able to enter a path along which the tiles from Google Maps are downloaded.
For entering the path you do the following:
- Select a Ripping radius for the path. The path will have a width of twice this radius.
- Press the “Start Recording” button.
- Double click inside the viewing area on the points that you would like on the path.
- Press the “Stop Recording” button.
You will see a visual cue in the form of a transparent red line covering the area that will be ripped.
Now that you have entered the path, you can specify the parameters to use for ripping the tiles on the path:
- Enter the type of tiles you want to download.
- Enter the Ripping Zoom Factor of the tiles
- Enter the folder into which to download the tiles.
You can now press the “Start ripping” button and the downloading of the tiles will start. As a visual cue you will see transparent green squares appear for each tile that was downloaded. If a tile for some reason could not be downloaded a red square will appear.
To see the tiles available in a certain folder you can select a folder as explained above and click the “Show Folder Content” button.
Tracing a route and follow it with your GPS: the Routing and GPS layers
The application does not allow to calculate the route between two points. To be able to follow a route using the further explained GPS I implemented the possibility to trace a route and save it on your local drive.
For entering the path you proceed as follows:
- Press the “Start Routing” button.
- Double click inside the viewing area on the points that you would like on the path.
- Press the “Stop Routing” button.
When adding points you will see them being connected by a green line.
Now you can save this route:
- Select a file to which you want to save the route
- Hit the “Save route” button
To recall a saved route:
- Select a file from which you want to restore the route
- Hit the “Load route” button
Because the route is saved as a gpx file, you can load any gpx file as a trace file. And thanks to this site you can save a the route description from google maps as a gpx file. This aleviates the need to trace the route yourself.
And now the GPS functionality.
There are three main functional areas for this:
- Reading from a gpx file
- Reading from a raw NMEA file
- Reading from a NMEA server atached to the serial port
In the case of the file reading you must enter the path to the file from which to read. The controls with the Navigating button allow for selecting a gpx file, while the controls around the File button allow for selecting a raw NMEA file format, that is the direct output of a gps antenna. In case of the serial port reader you must select the name of the serial port. In my case this is “COM5”. If everything went right the map should position itself with the longitude and lattitude provided by the GPS reader in the center. A red circle marks this point with a line at it’s center showing the direction you’re moving.
Combining the routing and then starting the GPS should make it more or less clear where to drive.
Importing another map as a bitmap and calibrate using Google Maps
With this layer you can split bitmap which has the image of a map into tiles, save them to a folder on your harddrive and then view them using the Folder tileserver.
Here are the main steps you’ll have to take:
- Go to the area with the server of your choice
- Open the Import layer
- Select a bitmap
- Select two points to stretch the bitmap over the server tiles, thus calibrating the bitmap
- Select the tiles you want to create and the zoomlevel they should have
- Select a folder and import the created tiles
In detail this gives:
Select a server you will use for calibrating the imported bitmap. This will typically be the Google Maps server but could be any supported server which covers the area of the bitmap.
Then type in the location your bitmap covers in the “location” textbox and hit the Enter key.
On the Layers tab, click the Add button and select the Import layer in the dialogbox. Hit the Selct button and you should now see the following controls on the Layers tab.
Click the “Select File” button and select the bitmap you would like to import. The selcted bitmap will be drawn on top of the tiles served by the selected server. It will initaly be drawn with a transparency of 50%, but with the “Bitmap transparency” slider you can adjust it.
Moving the slider to the left will make the bitmap more transparent, thus showing more of the tiles underneath it. Moving it to the right will make it less transparent, thus hiding the tiles underneath it.
Select a transparency which allows you to identify certain key-points in the bitmap and there corresponding point on the bitmaps
Click the “Add Point” button.
Now be carefull: click on a point in the bitmap and drag it to the corresponding Google Maps point and NOT THE OTHER WAY AROUND !! There are still some usability issues here which, if you make a mistake, you have to start allover again.
Click on the “Add Point” button again.
You have now added your first mapping point. You will see a small blue circle on the point where you made the connection. Also, if you now drag the tiles, the bitmap will ove with them.
Click the “Add Point” button again.
Again, drag a point from the bitmap to a point on the tiles and make no mistakes: you will not get a second chance !! You will see that while dragging, the bitmap is scaled and not moved: you allready mapped a first point and that point will stay fixed. To map the second point the bitmap must be stretched.
Click the “Add Point” button again.
By adding these two points, you mapped the bitmap onto the tiles and have thus calibrated the bitmap. You will see a small blue circle on the point where you made the connection. You will also see a raster of lines appear. These are the tiles that will be created aventually using the zoomlevel that is selected by default.
The default Zoomlevel for downloading tiles is 15, but if you would like to download them using another zoomlevel you can adapt it by clicking the “Import Zoom Factor” up-down control. If you do this, you will see the raster change.
When having mapped a bitmap onto the tiles you will see that the edges of the bitmap will not always map to a complete tile. You can prevent these tiles from being created by clicking the “Exclude Tiles” button and clicking inside the tiles you want to exclude. If you made a mistake, click the “Include Tiles” button and click inside the tiles you want to create anyway. Tiles that will be excluded have a red border and tiles that will be included have a green border.
Finally click the “…” button to select a target folder in which the imported tiles will be created and hit the “Import” button. The bitmap will be split in the requested tiles. You can view them using the “Folder” server and selecting the folder you selected for importing the bitmap.
Hope you enjoy the application.
Google Maps base url table
I’ve noticed that Google sometimes updates the base-url it uses to get the various tiles from their servers. Allthough nothing fundamentaly changes in the application, this used to result in tiles saying you have a web-error, which was correct because the application could not get at the tiles.
Prevously this resulted in small application updates that just changed the base urls. But now I updated the application so that you can update the base urls yourself, or you can automaticaly retireve them from the below table.
|URL release date||Map base URL||Transparent map base URL||Satelite base URL|
If you use the Google Server tab to obtain tiles you will see the following screen:
You have two possibilities:
1/ You can figure out the base urls yourself or copy them from the above table in the appropriate textboxes and save them in the configuration file by hitting the Save button
2/ You can obtain the last update available in this table by hitting the Retrieve button.
I’ve noticed that reading from the serial port doesn’t always succeed. I sometimes need to start the application several times before connecting succeeds. I’m using a TomTom bluetooth GPS receiver. If anyone knows about the problem and has a solution I’d be happy if you would share it with me.
The Import layer does work but has some user interface issues. So if you make a mistake you will have to start allover again.
The Mobile version has been stabilized a lot but is still a little bit slow.
Next on my list of whiches is (in no particular order):
- Export to one or multiple bitmaps
- Print an area
- Have the possibility to save the route you followed to a GPX file, thus providing the possibility to contribute to the OpenStreetMap community
- Stabilize existing functionality
- Streamlining the buildprocess and provide more code documentation
Downloads Version 1.4.2
Source and binaries are provided under the following license:
Copyright (c) 2007 – 2009, Serge Desmedt
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of “Serge Desmedt” or “Hungry For Knowledge” nor the
names of any other contributors may be used to endorse or promote
products derived from this software without specific prior written
THIS SOFTWARE IS PROVIDED BY Serge Desmedt “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 december 2007: Original article
8 february 2008: Version 22.214.171.124
- Change in google url for map-tiles
16 march 2008: Version 126.96.36.199
- New user interface
- Added the ability to view in full screen mode
- Added the ability to view the covered area of tiles in a folder
- Change in google url for map-tiles
- Version for Windows Mobile
- Binaries are wrapped in an installer
1 june 2008: Version 188.8.131.52
- Added Import layer
- Stabilized Mobile version
8 june 2008: Version 184.108.40.206
- Corrected bug in caching algorithm
27 juli 2008: Version 220.127.116.11
- Added view for Google Maps Server to correct the base-url’s for retrieving tiles
- Added retrieve functionality to get the latest base-url’s from teh table under heading “Google Maps base url table”
12 januari 2009: Version 18.104.22.168
- Corrected bug which made it impossible to download tiles
12 januari 2009: Version 22.214.171.124
- Updated code to construct the map URL
- Temporarily inactivated downloading of satellite tiles
- Release sourcecode on Codeplex