convert img.x to minx or maxx or mapext or imgext?
P Kishor
punkish at EIDESIS.ORG
Wed Oct 4 09:48:29 PDT 2006
John,
There are tons of rubber band implementations out there... grab one,
pore through the code, ask the author for help, etc.
In the meantime, a little primer here --
img.x|y are the coordinates generated by the browser based on your
mouseclick on an image that is inside a form element. They really have
no direct connection to the imgext (pixelspace) or mapext
(realworldspace) other than they happen to be within those bounds.
Since you know the extent of the real world that your map is showing,
and the size of the image that makes up that map, provided your
coordinate system is cartesian, you can map one to the other and
calculate back and forth. You can do so on the server-side, or you can
do so on the client side (within Javascript), thereby showing "live
coords" below the map image as the user moves the mouse around over
the image of the map.
On 10/4/06, John Smith <jayzee.smith at gmail.com> wrote:
> guys,
> i tried plotting sample coordinates to get some relationship factor. no
> luck. you'd think imgext to be a subset of mapext, but it's not.
>
> anyway, why am i sweating you ask? i want to make my own rubber band and
> there is no plug-and-play script out there unless i am missing something.
>
> so what is the relationship between imgext and mapext?
> jzs
>
>
> On 10/4/06, John Smith <jayzee.smith at gmail.com > wrote:
> > hi guys!
> > the subject says it all
> > jzs
>
--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation https://edu.osgeo.org/
More information about the MapServer-users
mailing list