Wrox Programmer Forums
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 3rd, 2006, 02:29 PM
Registered User
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Map Coordinates


How do you convert the mouse x,y coordinates on the screen to map coordinates (lat, lon)? I've recently switched from Visual Fortran to VB.NET and am in the process of migrating my code. I'm not sure how the conversion of x,y coordinates to map coordinates is done in VB.NET.

Old May 5th, 2006, 11:02 AM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

Determine the max & min mouse X & Y over the surface of the map.
Determine the max & min lat & lon over the surface of the map.
Find what percentage of the mouse’s span you are at, and convert that to a percentage of the span of the map’s coordinates.
Old May 8th, 2006, 10:52 AM
Registered User
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks, Brian! I was hoping that I was overlooking some type of function that would take the mouse coordinates and output map coordinates based on settings. Looks like I need to create one ;)

Similar Threads
Thread Thread Starter Forum Replies Last Post
google map clicked coordinates neon20 Javascript 4 June 18th, 2008 07:32 AM
Heat Map over Google Map ajit Javascript 0 March 7th, 2008 09:01 AM
Image Coordinates everest ASP.NET 1.0 and 1.1 Basics 1 October 18th, 2005 11:54 PM
pixel coordinates david.iulian Classic ASP Basics 0 March 31st, 2005 07:03 AM
coordinates buzzfever Beginning VB 6 1 September 23rd, 2003 05:32 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.