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

Stefanos Anastasiou emperor_stef at yahoo.gr
Thu Apr 7 05:55:35 PDT 2016


OK I got it....
My IMAGESIZE is set to 800 600 in the mapfile
In my template the CGI parameters in the form are set to <input type="image" name="img" src="[img]" width="700" height="500">.
It seems that the width and height values have to be the same on both the mapfile and the template...or not set in the template at all. 

    Στις 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/9fbff49b/attachment-0001.html>


More information about the mapserver-users mailing list