Hi all! This is my map-file:<br><br>MAP<br>&nbsp;IMAGETYPE GIF<br>&nbsp;EXTENT 77.892399 49.045435 87.227800 56.044065<br>&nbsp;SIZE 800 600<br>&nbsp;WEB&nbsp;<br>&nbsp;TEMPLATE &quot;/ms4w/apps/mslocal/templates/exampleGL.html&quot;<br>&nbsp;IMAGEPATH &quot;/ms4w/tmp/ms_tmp/&quot;<br>
&nbsp;IMAGEURL &quot;/ms_tmp/&quot;<br>&nbsp;END<br>&nbsp;LAYER<br>&nbsp;NAME &quot;roads&quot;<br>&nbsp;CONNECTIONTYPE postgis<br>&nbsp;CONNECTION &quot;user=postgres password=gaster84 dbname=city host=localhost&quot;<br><br>&nbsp;DATA &quot;the_geom from (SELECT the_geom,gid, distance(the_geom,<br>
geometryfromtext(&#39;POINT(&#39; || (%mx% + %img.x% * %mw% / %iw%) || &#39; &#39;<br>|| (%my% - %img.y% * %mh% / %ih%) || &#39;)&#39;,4326)) AS dist FROM<br>roads) as foo using srid=4326 using unique gid&quot;<br>&nbsp;<br>&nbsp;TYPE LINE<br>
&nbsp;...<br><br>When i insert url such as <a href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL.map&amp;layer=roads&amp;mx=77&amp;my=87&amp;iw=800&amp;ih=600&amp;mw=10&amp;mh=7&amp;mode=browse&amp;img.x=400&amp;img.y=400">http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL.map&amp;layer=roads&amp;mx=77&amp;my=87&amp;iw=800&amp;ih=600&amp;mw=10&amp;mh=7&amp;mode=browse&amp;img.x=400&amp;img.y=400</a><br>
MapServer returns error&nbsp;<br><br>msDrawMap(): Image handling error. Unable to initialize image. msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000. msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000.<br>
<br>If i use map file (fragment):<br><br>&nbsp;DATA &quot;the_geom from (SELECT the_geom,gid, distance(the_geom,<br>geometryfromtext(&#39;POINT(&#39; || (%mx% + %imgx% * %mw% / %iw%) || &#39; &#39;<br>|| (%my% - %imgy% * %mh% / %ih%) || &#39;)&#39;,4326)) AS dist FROM<br>
roads) as foo using srid=4326 using unique gid&quot;<br><br>and url <a href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL2.map&amp;layer=roads&amp;mx=77&amp;my=56&amp;iw=800&amp;ih=600&amp;mw=10&amp;mh=7&amp;mode=browse&amp;imgx=400&amp;imgy=400">http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL2.map&amp;layer=roads&amp;mx=77&amp;my=56&amp;iw=800&amp;ih=600&amp;mw=10&amp;mh=7&amp;mode=browse&amp;imgx=400&amp;imgy=400</a><br>
MapServer works correctly and generate map. If i click on map then img.x and img.y automatically added to url and MapServer returns error such i write above.<br><br>Please help me. I want, that mouse click coordinates returns to the mapfile. What I need do?<br>
<br>