[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

Set up world map with click locations

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
lsternlicht
Asked:
lsternlicht
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
McExpCommented:
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
 
McExpCommented:
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
 
McExpCommented:
Should have said you don't need the maths for GoogleMaps it will do it for you.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
lsternlichtAuthor Commented:
no, not googlemaps, i need this from my own image on an html page
0
 
Loganathan NatarajanLAMP DeveloperCommented:
to have dynamic cities and details, better use google maps or yahoo maps ...it allows everything..,
0
 
lsternlichtAuthor Commented:
logudotcom, how would i do this?
0
 
Loganathan NatarajanLAMP DeveloperCommented:
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
 
ValaneCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now