Hi all! This is my map-file:<br><br>MAP<br> IMAGETYPE GIF<br> EXTENT 77.892399 49.045435 87.227800 56.044065<br> SIZE 800 600<br> WEB <br> TEMPLATE "/ms4w/apps/mslocal/templates/exampleGL.html"<br> IMAGEPATH "/ms4w/tmp/ms_tmp/"<br>
IMAGEURL "/ms_tmp/"<br> END<br> LAYER<br> NAME "roads"<br> CONNECTIONTYPE postgis<br> CONNECTION "user=postgres password=gaster84 dbname=city host=localhost"<br><br> DATA "the_geom from (SELECT the_geom,gid, distance(the_geom,<br>
geometryfromtext('POINT(' || (%mx% + %img.x% * %mw% / %iw%) || ' '<br>|| (%my% - %img.y% * %mh% / %ih%) || ')',4326)) AS dist FROM<br>roads) as foo using srid=4326 using unique gid"<br> <br> TYPE LINE<br>
...<br><br>When i insert url such as <a href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL.map&layer=roads&mx=77&my=87&iw=800&ih=600&mw=10&mh=7&mode=browse&img.x=400&img.y=400">http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL.map&layer=roads&mx=77&my=87&iw=800&ih=600&mw=10&mh=7&mode=browse&img.x=400&img.y=400</a><br>
MapServer returns error <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> DATA "the_geom from (SELECT the_geom,gid, distance(the_geom,<br>geometryfromtext('POINT(' || (%mx% + %imgx% * %mw% / %iw%) || ' '<br>|| (%my% - %imgy% * %mh% / %ih%) || ')',4326)) AS dist FROM<br>
roads) as foo using srid=4326 using unique gid"<br><br>and url <a href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL2.map&layer=roads&mx=77&my=56&iw=800&ih=600&mw=10&mh=7&mode=browse&imgx=400&imgy=400">http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/mslocal/map/exampleGL2.map&layer=roads&mx=77&my=56&iw=800&ih=600&mw=10&mh=7&mode=browse&imgx=400&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>