Click here to Skip to main content
12,746,681 members (28,486 online)
Click here to Skip to main content
Add your own
alternative version


25 bookmarked
Posted 15 Dec 2007

Google Map Joiner

, 20 Dec 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
Merge some small print-screen maps to a big one
Screenshot -


This code uses the mouse's move and drag events to move Google map, then copy the map of the current-screen, finally merge them to a big one.


When I have to go to another city, I always need the help of maps. Because my mobile cannot access the Web when I travel, I always collect the Google map, then merge it into one big map, and put it into my mobile. The code I discuss below does the task.

Using the Code

First, open Google Map, select a place you want to copy.

Second, move the mouse to the left-top point of the useful map, then stop for two seconds; the code will remember the left-top point.

Third, move the mouse to the right-bottom point of the useful map, then stop for two seconds; the code will remember the right-bottom point.

Screenshot - example.JPG

Fourth, select how big the map will be. The code will copy the map as shown in the following picture. The current screen will be centered.

Screenshot - example.JPG

Finally, click start.

The mouse move code looks like this:

static extern bool SetCursorPos(int x, int y);

static extern void mouse_event
    (uint mouseEvent, int dx, int dy, uint data, int extrainfo);

SetCursorPos(x1, y1);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
SetCursorPos(x2, y2);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);


  • 15th December, 2007: Initial version
  • 21st December, 2007: Updated to delete Temp folder


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
China China
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralNice One Pin
mbaocha4-May-09 17:28
membermbaocha4-May-09 17:28 
GeneralIt can't work. Because i let mouse switched left & right button. Pin
Andy Byron27-Sep-08 9:02
memberAndy Byron27-Sep-08 9:02 
GeneralThis code sucks Pin
Member 271004229-Feb-08 14:37
memberMember 271004229-Feb-08 14:37 
GeneralVery Good, But How can I add Latitude and Longitude to it Pin
kedanz2-Feb-08 18:12
memberkedanz2-Feb-08 18:12 
GeneralDANGER !!! Pin
carlop()18-Dec-07 5:12
membercarlop()18-Dec-07 5:12 
GeneralRe: DANGER !!! Pin
lovexia18-Dec-07 21:07
memberlovexia18-Dec-07 21:07 
GeneralRe: DANGER !!! Pin
lovexia18-Dec-07 21:10
memberlovexia18-Dec-07 21:10 
GeneralRe: DANGER !!! Pin
kesmellon20-Dec-07 16:36
memberkesmellon20-Dec-07 16:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170215.1 | Last Updated 20 Dec 2007
Article Copyright 2007 by kesmellon
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid