[Geomoose-users] Feature Report error with Identify Tool

TC Haddad tchaddad at gmail.com
Tue Jun 2 23:27:54 PDT 2015


What's happening is exactly what the error says:

setExtent(0, 0, 0, 0)

is an invalid extent, so nothing can be returned from the query for your
report.

The question is why is your application sending invalid extents? It seems
like it may have something to do with the coordinate system you are using.
Something is not translating coordinates correctly, resulting in non-valid
values being passed.

Can you re-state how your coordinate system is defined in the map file, and
also in the mapbook?

On Tue, Jun 2, 2015 at 11:13 PM, Fernando <nando_gcia at hotmail.com> wrote:

> Brent sorry but your solution doesn't work:
>
>     <service name="feature_report" display="false" keep-others="true">
>         <url>php/feature_report.php</url>
>         <input type="hidden" name="layers"
> value="edificio_c2_espacios/C2-ALBERT_EINSTEIN"/>
>         <input type="hidden" name="src"/>
>         <input type="hidden" name="DXF_TEXT"/>
>     </service>
>
> Still Appears error:
>
> Warning: mapObj::setExtent(): [MapServer Error]: setExtent(): Given map
> extent is invalid. Check that it is in the form: minx, miny, maxx, maxy
>  in C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 100
> Fatal error: Uncaught exception 'MapScriptException' in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php:100
> Stack trace:
> #0 C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php(100): *mapObj->setExtent(0,
> 0, 0, 0)*
> #1 {main}
>   thrown in C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line
> 100
>
> I'm a little lost, what is happening?
>
>
> ------------------------------
> Date: Tue, 2 Jun 2015 07:35:29 -0600
> From: bfraser at geoanalytic.com
> To: nando_gcia at hotmail.com; geomoose-users at lists.osgeo.org
> Subject: Re: [Geomoose-users] Feature Report error with Identify Tool
>
> The errors mean that the shape/feature is not found, so the extents are
> not valid and the shape/feature has no values.
>
> Change your feature _report service in your mapbook.xml to:
>
>     <service name="feature_report" display="false" keep-others="true">
>         <url>php/feature_report.php</url>
>         <input type="hidden" name="layers" value="lmic/fsa"/>
>         <input type="hidden" name="src"/>
>         <input type="hidden" name="*DXF_TEXT*"/>
>     </service>
>
> This will ensure the JavaScript that handles the service call will send
> the DXF_TEXT value to the feature_report.php.
>
> Best Regards,
> Brent Fraser
>
> On 6/2/2015 5:35 AM, Fernando wrote:
>
> Thanks all for your contributions. Incredibly the first error has
> disappeared with only capitalize the dfx_text field in identify.html file:
>
> <!-- MapServer Template -->
> <tr bgcolor="#DEE5EB"><td colspan="2"><b><u>ESPACIOS</u></b></tr><tr>
> <td align="right"><b>IDENTIFICADOR:</b></td>
> <td>[dxf_text] <a href="javascript:GeoMOOSE.startService('feature_report',
> {'*DXF_TEXT*' : '[dxf_text]', 'src' :
> 'edificio_c2_espacios/C2-ALBERT_EINSTEIN'})">Report</a></td>
> </tr>
> <tr>
> <td align="right"><b>CONTENIDO:</b></td>
> <td>[contenido]</td>
> </tr>
>
>
> But still appears error:
>
> Warning: mapObj::setExtent(): [MapServer Error]: setExtent(): Given map
> extent is invalid. Check that it is in the form: minx, miny, maxx, maxy
>  in C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 100
> Fatal error: Uncaught exception 'MapScriptException' in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php:100
> Stack trace:
> #0 C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php(100): *mapObj->setExtent(0,
> 0, 0, 0)*
> #1 {main}
>   thrown in C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line
> 100
>
> Line 100 of the file says:
>
> $mapObj->setExtent($shape->bounds->minx,$shape->bounds->miny,$shape->bounds->maxx,$shape->bounds->maxy);
>
> but if I change that row so manually for example set to the initial extend:
> $mapObj->setExtent(358836,4186265,359163,4186624);
>
> The error disappears, and finally load the popup with the 3 options:
>
> View in a new Window / Tab
> Download
> Close this Window
>
> but the more errors appear then:
>
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 128
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 128
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 128
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 128
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 128
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\geomoose2\htdocs\php\feature_report.php on line 128
>
> <results><script>GeoMOOSE.download("print_14332443998300","pdf");</script><html></html></results>
>
> Why the error occurs on line 100 of feature_report.php file?
>
>
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150602/d0b2b907/attachment-0001.html>


More information about the Geomoose-users mailing list