Click here to Skip to main content
Click here to Skip to main content

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 -

Introduction

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.

Background

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:

[DllImport("user32.dll")]
static extern bool SetCursorPos(int x, int y);

[DllImport("user32.dll")]
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);
Thread.Sleep(500);
SetCursorPos(x2, y2);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

History

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

License

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

Share

About the Author

kesmellon
Web Developer
China China
No Biography provided

Comments and Discussions

 
GeneralNice One Pinmembermbaocha4-May-09 17:28 
GeneralIt can't work. Because i let mouse switched left & right button. PinmemberAndy Byron27-Sep-08 9:02 
GeneralThis code sucks PinmemberMember 271004229-Feb-08 14:37 
GeneralVery Good, But How can I add Latitude and Longitude to it Pinmemberkedanz2-Feb-08 18:12 
GeneralDANGER !!! Pinmembercarlop()18-Dec-07 5:12 
GeneralRe: DANGER !!! Pinmemberlovexia18-Dec-07 21:07 
GeneralRe: DANGER !!! Pinmemberlovexia18-Dec-07 21:10 
GeneralRe: DANGER !!! Pinmemberkesmellon20-Dec-07 16:36 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141216.1 | Last Updated 20 Dec 2007
Article Copyright 2007 by kesmellon
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid