Posted by frothpoker on 07/04/06 10:39
> Umm...why are they not the same?
>
Cos he's got the latitude and longlitude and wants to convert that to
xy coords.
I am assuming that the lat/long is derived from a data source.
You need to convert that into xy coords for your map.
I would do this:-
Determine the lat/long of top-left and bottom-right of the map
Determine the width and height of the map in pixels
work out the xy coords by calculating degrees east and south of the
top-left corner. If you need minutes and seconds, remember you are
working in base 60!!!
display the main map in a <DIV>
Display the coordinate marker in another <DIV> and position it relative
to the map DIV using and in-line style sheet; setting up the horizontal
and vertical offsets using PHP. If you are putting up more than one
marker you may need to manage the layer order of the DIVs as well.
This should display the map reference in the right place but you would
not be able to right click and save image as, because it is actually
two images..
frothpoker
[Back to original message]
|