<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px"><div id="yui_3_16_0_ym19_1_1460029247076_29190"><span>OK I got it....</span></div><div id="yui_3_16_0_ym19_1_1460029247076_29149"><span><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1460029247076_29150">My IMAGESIZE is set to 800 600 in the mapfile</div><div dir="ltr" id="yui_3_16_0_ym19_1_1460029247076_29151"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1460029247076_29075">In my template the CGI parameters in the form are set to <input type="image" name="img" src="[img]" width="700" height="500">.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1460029247076_29075"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1460029247076_29075">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.</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 14px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Στις 4:03 μ.μ. Τετάρτη, 6 Απριλίου 2016, ο/η Jeff McKenna <jmckenna@gatewaygeomatics.com> έγραψε:<br></font></div>  <br><br> <div class="y_msg_container">Hi Stefanos,<br clear="none"><br clear="none">When I try this locally with CGI, I also get the same value on first <br clear="none">load for [mapx] and [mapy] of -1.0000,-1.0000 likely because there is no <br clear="none">point click yet.  But when I do click, the values for [mapx] and [mapy] <br clear="none">returned look valid.<br clear="none"><br clear="none">You might also want to check the returned values for [maplat] [maplon] <br clear="none">as well.<br clear="none"><br clear="none">If it is related to a projection issue, you might want to check the <br clear="none">mailing list archives for relevant discussions, such as <br clear="none"><a shape="rect" href="http://osgeo-org.1560.x6.nabble.com/retrieve-map-coordinates-with-different-EPSG-td5000369.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/retrieve-map-coordinates-with-different-EPSG-td5000369.html</a><br clear="none"><br clear="none">I am testing with MS4W 3.1.3 (MapServer 7.0.1).<br clear="none"><br clear="none">-jeff<br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Jeff McKenna<br clear="none">MapServer Consulting and Training Services<br clear="none"><a shape="rect" href="http://www.gatewaygeomatics.com/" target="_blank">http://www.gatewaygeomatics.com/</a><br clear="none"><br clear="none"><br clear="none"><br clear="none">On 2016-04-05 7:37 PM, Stefanos Anastasiou wrote:<br clear="none">>      Hello list.<br clear="none">><br clear="none">> I'm having a problem I can't understand where it's coming from. I'm<br clear="none">> using [mapx] and [mapy] parameters to get the coordinates of a simple<br clear="none">> click. When I click anywhere on the image, the resulting x,y is at least<br clear="none">> 1 kilometer North-West from where it should. The image coordinates look<br clear="none">> correct but the x,y are really wrong. I'm copying and pasting my form<br clear="none">> variables below:<br clear="none">><br clear="none">>   <form name="the_form" method=GET action="/cgi-bin/mapserv"><br clear="none">>                          <input type="hidden" name="imgext"<br clear="none">> value="[mapext]"><br clear="none">>                          <input type="hidden" name="map" value="[map]"><br clear="none">>                          <input type="image" name="img" src="[img]"<br clear="none">> width="700" height="500"><br clear="none">>                          <input type="hidden" name="zoomsize" value="2"><br clear="none">><br clear="none">><br clear="none">> When I first load the map with the following URL<br clear="none">> <a shape="rect" href="http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map" target="_blank" onclick="return theMainWindow.showLinkWarning(this)">http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map</a><br clear="none">> <<a shape="rect" href="http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/trikala.map" target="_blank" onclick="return theMainWindow.showLinkWarning(this)">http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/trikala.map</a>><div class="yqt3237185426" id="yqtfd88807"><br clear="none">><br clear="none">> x, y are set automatically in -1,000000 -1,000000.<br clear="none">><br clear="none">> Any idea?<br clear="none">><br clear="none">><br clear="none">><br clear="none">> Regards,<br clear="none">> Stefanos</div><br clear="none">><br clear="none"><br clear="none"><br clear="none"><br clear="none">_______________________________________________<br clear="none">mapserver-users mailing list<br clear="none"><a shape="rect" ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br clear="none"><a shape="rect" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br><br></div>  </div> </div>  </div></div></body></html>