[mapserver-users] Can QUERY mode process XY as map/data coordinates instead of pixel XY?

Eduardo Kanegae eduardo.kanegae at gmail.com
Mon Jan 27 10:02:55 PST 2014


hi Steve,

In fact I'm doing a "zoom-to-found-feature" with this identify. I'm
using 'shpext' to create such ZoomTo. Because the queried layer is a
line layer, when feature found is a straight line it works. But if the
feature found is more like a curve or do not have any segments at the
center (200px 200px), then "no feature found" error is displayed.

https://dl.dropboxusercontent.com/u/108047961/debug/map-hitpoint.jpg -
see the blue pin icon

https://dl.dropboxusercontent.com/u/108047961/debug/map-info.jpg - and
identify/zoomTo window is shown

Then, as suggested, I changed img.x and img.y to "mapxy=[mapx]+[mapy]"
and the feature is highlighted BUT the map is shown at the default
extent (MAP->EXTENT)
https://dl.dropboxusercontent.com/u/108047961/debug/map-3.jpg

Eduardo Patto Kanegae
http://www.webmapit.com | @webmapit
Eduardo Patto Kanegae
http://www.webmapit.com | @webmapit


2014-01-27 Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>:
> Hi Eduardo: It's not real clear what you're trying accomplish, but I can say that imgext and img.x/.y can only take pixel coordinates. Is the problem that in your  template you can't reference the map coordinates of the click? If so, the [mapx] and [mapy] tags expose that info.
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Eduardo Kanegae
> Sent: Monday, January 27, 2014 11:11 AM
> To: List (MapServer Users)
> Subject: [mapserver-users] Can QUERY mode process XY as map/data coordinates instead of pixel XY?
>
> hi,
>
> I'm running MapServer 6.4.0 under Linux and I need to render an output query map (hilighting matched feature) using an URL like this:
> * IMPORTANT: this 2nd query map is being rendered after a 1st query mode - it's embed into layer's template.
>
> http://myserver/cgi-bin/mapserv?MAP=../mymap.map&MODE=query&LAYERS=all&QFORMAT=AGG8&MAP_SIZE=440+440&IMGEXT=[shpext_esc
> expand=75]&QLAYER=[cl]&IMG.X=220&IMG.Y=220
>
> BUT, I do not want to inform IMG.X and IMG.Y because this works only if I select a simple a flat line. If I choose a "curved line" (not simple flat line), XY will fall OUTSIDE the line and then my simulated "click into center" (220, 220) fails.
>
> Then, I wanted to know if is there a way to pass img.x and img.y as map coordinates, not pixel coordinates.
>
> thanks in advance.
>
> Eduardo Patto Kanegae
> http://www.webmapit.com | @webmapit
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


More information about the mapserver-users mailing list