[Geomoose-users] Feature Report error with Identify Tool

Brent Fraser bfraser at geoanalytic.com
Tue Jun 2 06:35:29 PDT 2015


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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150602/60bcea97/attachment.html>


More information about the Geomoose-users mailing list