Click here to Skip to main content
6,629,377 members and growing! (22,005 online)
Email Password   helpLost your password?
Languages » C# » Windows Forms     Intermediate License: The GNU General Public License (GPL)

Map Grabber on C#

By Yuri Panshin

Prepare maps for your holidays, your walking, your bike trips, your geocaching...
C# (C# 2.0), Windows (WinXP, Win2003), .NET (.NET 2.0)
Posted:23 Feb 2008
Updated:12 May 2008
Views:22,862
Bookmarked:45 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
17 votes for this article.
Popularity: 5.35 Rating: 4.35 out of 5
2 votes, 11.8%
1

2
1 vote, 5.9%
3
3 votes, 17.6%
4
11 votes, 64.7%
5

MainScreen.jpg

Introduction

Grab maps ....

Prepare maps for your holidays, your walking, your bike trips, your geocaching... You
can next print them or use them with your GPS!

This utility automatically scrolls, captures, assembles and saves maps (or other window content) from a Web page to a JPG file.

Background

(Optional) Is there any background to this article that may be useful such as an introduction to the basic ideas presented?

Using the code

How to use?

- Go to the desired Web site, maximize your browser window.
- Locate the desired area on the map and zoom to the desired scale.
- In order to MapGrabber automatically realize the right scrolling, you have to parameter it according to the Web site.
Press the button 1 in MapGrabber (see illustrations), next click on the left/top corner of the map. To avoid capturing the toolbar, you can define the corner just below it.
Press the button 2 in MapGrabber, next click on the right/bottom corner of the map.
- To devide output image by slises, set the steps in one part.
- If you would like to calibrate maps in time of grabbing, you can use GPS Callibration part of the MapGrabber

You can now Save the settings for future use; each Web site will have its own settings.
The main screen:

MainScreen.jpg

- Menu:
Settings - Load and save your current settings for future using.
Help - The link to this page and information about me.

- Map Settings:
The position of left/top and right/left bounds of map, without active elements, on the screen. You can set points by enter the coordinates or by clicking on button "Point" and dragging the point.gificon to he's place on the screen.

- Capture Settings:
Delay Scroll - When Map grabber moving the map in map display program (Firefox), to program take time to response for her events. So need to delay Map grabber events according to response of display program.
Delay Capture - When Map grabber the map in map display program (Firefox), to load new images take some time. So you must set the parameter according to speed image loading.
Number of X/Y Steps - How match steps to do.

- Output image settings:
Divide Image X/Y - By how match steps divide the output image. Some programs that using output maps on pocket PC, take a lot time to load big image.
Map Path - The output image folder.

- With GPS calibration - Enable GPS automatic GPS calibration of output map.

- Show/Hide points - show/hide the map settings and GPS calibration points.

- GPS Calibration:
First point X/Y - The point of place that you know her GPS coordinates. You can set points by enter the coordinates or by clicking on button "Point" and dragging the icon to her place on the screen. You can use the magnifier to put the icon exactly to place of GPS coordinates.
First point Lat/Lon - The GPS coordinates of point.


Magnifier/Status window:

Magnifier.jpg

Points:

capture-screen.jpg

Prior to start capturing, set the amount of horizontal and vertical steps you desire.
Press the button Start.

Know Bugs:

found by me and another users.
- Memory out when grabbing more than 10X10 screens.

TODO:

what in next version.
- grab large size maps
- The GPSTuner have auto map loading feature. We can use maps with different resolution, and different level of information on map. That provide option in time of zoom out or zoom in, change maps automatically. So I want to add feature - grabbing maps with some levels of zoom.

Links / Credits

Main Site of Project

Project Page on MSDN Code Gallery
Project Page on CodePlex
GPS Tuner - is an off-road navigation software for Pocket PC devices. The maps of Map Grabber is collibrated for this programm.

Capturing the Screen Image in C#
Processing Global Mouse and Keyboard Hooks in C#

Disclaimer

Personal use only. Use at your own risk. No technical support given. Don't copy or distribute copyrighted media.
Screen captures will never replace a bought genuine printed map.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPL)

About the Author

Yuri Panshin


Member

Occupation: Software Developer (Senior)
Company: Easy-Forex Technology
Location: Israel Israel

Other popular C# articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 11 of 11 (Total in Forum: 11) (Refresh)FirstPrevNext
GeneralMy vote of 1 Pinmembermheskol9:06 14 Feb '09  
GeneralWorks OK with google Map but not google earth Pinmemberkedanz4:13 22 Jan '09  
GeneralProblem PinmemberTosdo23:36 18 Mar '08  
GeneralVery nice tool ! PinmemberEyal Lantzman22:23 1 Mar '08  
GeneralRe: Very nice tool ! PinmemberYuri Panshin22:32 1 Mar '08  
GeneralRe: Very nice tool ! PinmemberEyal Lantzman22:51 1 Mar '08  
GeneralRe: Very nice tool ! PinmemberYuri Panshin23:22 1 Mar '08  
GeneralRe: Very nice tool ! PinmemberEyal Lantzman23:28 1 Mar '08  
GeneralRe: Very nice tool ! PinmemberYuri Panshin23:35 1 Mar '08  
GeneralVery Nice Pinmembermerlin9815:39 27 Feb '08  
GeneralRe: Very Nice PinmemberYuri Panshin8:00 27 Feb '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 12 May 2008
Editor:
Copyright 2008 by Yuri Panshin
Everything else Copyright © CodeProject, 1999-2009
Web09 | Advertise on the Code Project