We implemented such a feature with Javascript and PHP-Mapscript.
Serverside (Mapscript):
- Get extent (reference_map->extent) and
- size of reference-map-image (reference_map->width, reference_map->height, pixel),
- Calculate the cellsize (meter per pixel),
- return these values to the client-browser (with Ajax f. e.).
(Hint: if you know these values and they don't change, you can also hard-code them in javascript)

Clientside Javascript:
- register mouse-down and mouse-up-events for the reference-map,
- get mouse-down and mouse-up cursor-positions of these events relativ to the upper-left corner of the reference-map (pixel), - calculate the real-world-coordiantes of the events with cursor-position, cellsize and the real-world-coordiantes of the upper-left reference-map-corner => new extent,
- call the new map-image (and the new reference-map-image) for this extent.

Ludwig



Message: 1
Date: Sat, 27 Mar 2010 13:15:23 +0200
From: ahmet temiz <[email protected]>
Subject: Re: [mapserver-users] choosing region of interest using
        "referencemap"
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Let me put it another way:

 I just want to set map extent from reference map using rectangle clip

 regards

2010/3/26 ahmet temiz <[email protected]>:
Let me put it another way:

I just want to set map extent from reference map using rectangle clip

regards

2010/3/26 Cristiano Sumariva <[email protected]>:
What do you mean by region of interest?
Want a highlight when a click happen over image ?

2010/3/26 ahmet temiz <[email protected]>
hello

I was wondering how I could choose region of interest using "referencemap"
?

Could you give me a hint ?

regards
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to