Solved

Set up world map with click locations

Posted on 2007-11-22
9
238 Views
Last Modified: 2013-12-26
I am trying to set up a one page web site with the following:
*Large image of a World Map
*I want most or all of the worlds cities mapped invisibly into the pixels.
*When you click a pixel the site tells you how far you are from selected location.

How would you recommend doing this preferably using php and mySQL.
Can use other format but no flash.

Thanks a lot!
0
Comment
Question by:lsternlicht
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 16

Expert Comment

by:McExp
ID: 20336419
This is not a trivial task!

Lot's of maths etc...

Have you considered Google Maps, there is a programming API which with a little thought will give you exactly what you need.
0
 
LVL 16

Expert Comment

by:McExp
ID: 20336430
For a starters, have a look at this page for a guide on the required maths:-

http://www.fes.uwaterloo.ca/crs/geog165/mapcoords.htm
0
 
LVL 16

Expert Comment

by:McExp
ID: 20336432
Should have said you don't need the maths for GoogleMaps it will do it for you.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:lsternlicht
ID: 20336624
no, not googlemaps, i need this from my own image on an html page
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 20339775
to have dynamic cities and details, better use google maps or yahoo maps ...it allows everything..,
0
 

Author Comment

by:lsternlicht
ID: 20379605
logudotcom, how would i do this?
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 250 total points
ID: 20379844
First look at the complete API specification at
http://code.google.com/apis/maps/documentation/index.html

then look the samples at
http://koti.mbnet.fi/ojalesa/exam/index.html

with PHP - MySQL db integrated...
http://maps.forum.nu/gm_markers_from_db.php
0
 

Assisted Solution

by:Valane
Valane earned 250 total points
ID: 21068587
Using geo-targeting (Usually through HTTP variables) you could probably pre-define the users position on a grid (your world map) and use javascript through AJAX to return a users click position in X/Y coordiniates, with that, you would then have to work out the length that a pixel would convert to in real world terms (1 pixel = 234.6 miles) then use the pre-definded coordiniates versus the new click coordinates to calculate the distance.

You may even be able to use PHP's GD library to create a "line" from start to finish locations on your world map if you generate the map dynamically.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question