[mapserver-users] Σχετ: Problem with CGI results

Stefanos Anastasiou emperor_stef at yahoo.gr
Thu Apr 7 05:33:57 PDT 2016


Hello Jeff,
 Thank you for the reply.  I'm pretty sure there's something I'm missing out here.
In my map object I set my extent to:  (retrieved from ogrinfo -al -so )       EXTENT 300000.000 4377000.000 304000.000 4380000.000       UNITS meters
If I click on the lower left corner of the image for the first time, [mapx], [mapy] will give: 300000.000, 4377500.000A click in the upper right corner gives me: 303500.000, 4380000.000
This doesn't seem pretty right.
I've set three projection objects, one in the map level and one on each layer with "init=epsg:2100".
[maplat], [maplon] also gives me wrong values with the same epsg, but 300 meters south than the [mapx], [mapx]
A first though would be that this should be a dataset problem 


   

    Στις 4:03 μ.μ. Τετάρτη, 6 Απριλίου 2016, ο/η Jeff McKenna <jmckenna at gatewaygeomatics.com> έγραψε:
 

 Hi Stefanos,

When I try this locally with CGI, I also get the same value on first 
load for [mapx] and [mapy] of -1.0000,-1.0000 likely because there is no 
point click yet.  But when I do click, the values for [mapx] and [mapy] 
returned look valid.

You might also want to check the returned values for [maplat] [maplon] 
as well.

If it is related to a projection issue, you might want to check the 
mailing list archives for relevant discussions, such as 
http://osgeo-org.1560.x6.nabble.com/retrieve-map-coordinates-with-different-EPSG-td5000369.html

I am testing with MS4W 3.1.3 (MapServer 7.0.1).

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-04-05 7:37 PM, Stefanos Anastasiou wrote:
>      Hello list.
>
> I'm having a problem I can't understand where it's coming from. I'm
> using [mapx] and [mapy] parameters to get the coordinates of a simple
> click. When I click anywhere on the image, the resulting x,y is at least
> 1 kilometer North-West from where it should. The image coordinates look
> correct but the x,y are really wrong. I'm copying and pasting my form
> variables below:
>
>  <form name="the_form" method=GET action="/cgi-bin/mapserv">
>                          <input type="hidden" name="imgext"
> value="[mapext]">
>                          <input type="hidden" name="map" value="[map]">
>                          <input type="image" name="img" src="[img]"
> width="700" height="500">
>                          <input type="hidden" name="zoomsize" value="2">
>
>
> When I first load the map with the following URL
> http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map
> <http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/trikala.map>
>
> x, y are set automatically in -1,000000 -1,000000.
>
> Any idea?
>
>
>
> Regards,
> Stefanos
>



_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160407/30ab5b03/attachment.html>


More information about the mapserver-users mailing list