[Geomoose-users] Setting up first geomoose app
Brent Fraser
bfraser at geoanalytic.com
Thu Jan 13 14:44:29 EST 2011
Carl,
One problem is that the coordinate system is defined as longlat, but the
extent is given is something other than decimal degrees:
EXTENT -990487.465830 -31957.211592 1696934.624449 1261986.757801
PROJECTION
'init=epsg:4326'
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
And in the mapbook as well.
Brent
> Hi,
>
> trying to get a basic app working in geomoose using our own data and I am
> getting a blank map area. I have set up a simple map file in the standard
> ms4w maps folder in a folder called ArcView, I have put my map file in to
> that folder and have tested it using a browser and can see a map and am
> able
> to download an xml document when I do a get capabilities request.
> The map file is as follows:
>
> ============== MAP FILE =======================
>
> MAP
> NAME "TESTMAP"
> # Map image size
> SIZE 800 800
> UNITS INCHES
>
> EXTENT -990487.465830 -31957.211592 1696934.624449 1261986.757801
> FONTSET "../fonts/fontset.list"
> SYMBOLSET "../symbols/symbol.sym"
> PROJECTION
> 'init=epsg:4326'
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> END
>
>
> IMAGECOLOR 255 255 255
> IMAGEQUALITY 95
> IMAGETYPE jpeg
>
> OUTPUTFORMAT
> NAME jpeg
> DRIVER 'GD/JPEG'
> MIMETYPE 'image/jpeg'
> IMAGEMODE RGBA
> EXTENSION 'jpeg'
> END
>
> LEGEND
> IMAGECOLOR 255 255 255
> STATUS ON
> KEYSIZE 18 12
> LABEL
> TYPE BITMAP
> SIZE MEDIUM
> COLOR 0 0 89
> END
> END
>
> WEB
> IMAGEPATH '/tmp/'
>
> IMAGEURL '/tmp/'
>
> METADATA
> 'ows_title' 'TESTMAP'
> 'ows_onlineresource' 'http://www.*ourserver*
> .com:2112/cgi-bin/mapserv.exe?map=testshp.map'
> 'ows_srs' 'EPSG:4326'
>
> END
>
> TEMPLATE 'foo'
> END
>
> LAYER
> NAME 'RECTANGLES'
> TYPE POLYGON
> DUMP true
> TEMPLATE fooOnlyForWMSGetFeatureInfo
> EXTENT -990487.465830 -31957.211592 1696934.624449 1261986.757801
> DATA 'D:/ms4w/apps/geomoose2/maps/ArcView/seamless_rectangle.shp'
> METADATA
> 'ows_title' 'rectangles'
> 'ows_srs' 'EPSG:4326'
>
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'init=epsg:4326'
> 'proj=longlat'
> 'ellps=WGS84'
> 'datum=WGS84'
> 'no_defs'
> END
> CLASS
> NAME 'seamless_rectangle'
> STYLE
> WIDTH 1
> OUTLINECOLOR 0 0 0
> COLOR 149 170 154
> END
> END
> END
>
> END
>
> =============== END OF MAP FILE=================
>
>
> The map book .xml is as follows, just a commented out version of the
> original one:
>
>
> ============== MAPBOOK.XML ===================
> <?xml version="1.0"?>
> <mapbook version="2.0">
> <configuration>
> <!--
> <param name="links_bar_html"><![CDATA[Perfect timing for some
> damn CDATA "all" of 'its' here <&>]]></param>
> <param name="layer_controls.unfade.on">false</param>
> -->
> <!-- <param name="zoomto['Jump To:']"><![CDATA[
> {
> 'Dakota County' :
> [521238.614537864,4924218.86673578,473921.947801381,4974430.36885032],
> 'Parcel Data' :
> [497205.409367,4923984.423582,477595.805945,4941970.52988],
> 'Full State of MN' :
> [189783.560000,4816309.330000,761653.524114,5472346.500000]
> }
> ]]></param> -->
> <param
> name="max_extent">-1053325.991731,-63036.027500,1763261.991731,1293098.927500</param>
> <param
> name="initial_extent">-990487.465830,-31957.211592,1696934.624449,1261986.757801</param>
>
> <param name="layer_controls.legend.on">false</param>
> <param name="mapserver_url">/cgi-bin/mapserv.exe</param>
> <param name="mapfile_root">/ms4w/apps/geomoose2/maps/</param>
>
> <param name="projection">EPSG:4326</param>
>
> <param name="layer_controls.up.on">false</param>
> <param name="layer_controls.down.on">false</param>
> <param name="layer_controls.legend.on">true</param>
>
> <param name="drawing_tools.default_fill">red</param>
> <param name="drawing_tools.default_stroke">yellow</param>
> <param name="drawing_tools.default_opacity">1</param>
>
> <param name="group_checkboxes">false</param>
>
> <param name="default_tab">Catalog</param>
> <param name="catalog_name">Catalog</param>
> <param name="show_service_settings_in">Information</param>
> <param name="show_results_in">Information</param>
>
> <param name="tabs"><![CDATA[
> {
> 'Catalog' : 'catalog-tab',
> 'Information' : 'information-tab',
> 'Custom' : 'custom-tab'
> }
> ]]></param>
>
> <param name="ground_units">km</param>
> <param name="scales">.5,1,4,8,16,24,32,64,128,270,550,1000</param>
> <param name="reference_map.enabled">false</param>
> <param name="coordinate_display.usng">false</param>
> <param name="jumpto_scales"><![CDATA[
> {
> '1:50000' : 50000,
> '1:24000' : 24000,
> '1:10000' : 10000,
> '1:5000' : 5000
> }
> ]]></param>
>
> </configuration>
> <!--
> The mapping services define the source of the mapping data.
> -->
>
> <map-source name="highlight" type="mapserver">
> <file/>
> <layer name="all"/>
> </map-source>
>
> <map-source name="TESTMAP" type="mapserver">
> <file>./ArcView/testshp.map</file>
> <layer name="rectangles"/>
> </map-source>
>
> <!-- <map-source name="borders" type="mapserver" reference="true">
> <file>./demo/statedata/basemap.map</file>
> <layer name="all"/>
> </map-source>
>
> <map-source name="iastate" type="wms" tiled="false"
> projection="EPSG:900913" width="512" height="512">
> <url>http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi
> </url>
> <layer name="nexrad-n0r"/>
> <param name="format" value="image/jpeg"/>
> <param name="TRANSPARENT" value="TRUE"/>
> </map-source>
>
> <map-source name="metbase" type="ags" >
> <url>
> http://gis.metc.state.mn.us/ArcGIS/rest/services/BaseLayer/UTMBaseMap/MapServer/export
> </url>
> <layer name="Met Council Base Map Layers" />
> <param name="FORMAT" value="JPG"/>
> </map-source>
>
> <map-source name="lmic" type="wms" tiled="false">
> <url>http://geoint.lmic.state.mn.us/cgi-bin/wms</url>
> <layer name="fsa2008"/>
> <layer name="bw1997"/>
> </map-source>
>
> <map-source name="usgs_doq" type="wms" tiled="false"
> projection='EPSG:26915'>
> <url>http://terraservice.net/ogcmap.ashx?</url>
> <layer name="DOQ"/>
> <param name="format" value="image/jpeg"/>
> <param name="TRANSPARENT" value="TRUE"/>
> </map-source>
>
> <map-source name="usgs_drg" type="wms" tiled="false"
> projection='EPSG:26915'>
> <url>http://terraservice.net/ogcmap.ashx?</url>
> <layer name="DRG"/>
> <param name="format" value="image/jpeg"/>
> <param name="TRANSPARENT" value="TRUE"/>
> </map-source>
>
> <map-source name="reference" type="wms" tiled="false"
> reference="true">
> <url>http://geoint.lmic.state.mn.us/cgi-bin/wms</url>
> <layer name="fsa2008" reference="true" />
> </map-source> -->
>
> <service name="print" title="Print Map">
> <step type="input">
> <url>php/print.php</url>
> <input type="print_info" name="layers"/>
> <input type="extent" name="extent"/>
> <input type="sketches" name="sketches"/>
>
> <input type="user" name="title" title="Map Title">Map</input>
> <input type="hidden" name="date" title="Map Date">true</input>
>
> <input type="select" name="template" title="Output Template:
> ">
> <option value="letter_landscape">Letter -
> Landscape</option>
> <option value="letter_portrait">Letter - Portrait</option>
> <option value="poster_landscape">11" x 17" -
> Landscape</option>
> <option value="poster_portrait">11" x 17" -
> Portrait</option>
> </input>
>
> <input type="select" name="quality" title="Image Quality: ">
> <option value="2">Higher</option>
> <option value="3">Highest</option>
> <option value="1">Standard</option>
> </input>
>
> <input type="select" name="scale" title="Preserve Scale: ">
> <option value="preserve">Yes</option>
> <option value="no">No</option>
> </input>
> </step>
> </service>
>
> <service name="identify" title="Identify" display="false">
> <url>php/identify.php</url>
> <step type="spatial" name="shape" line="false" polygon="false"
> jump-start="true" default="point">
> <input type="visiblelayers" name="layers"/>
> </step>
> </service>
>
> <service name="birdseye" display="false" target="_blank">
> <url>php/birdseye.php</url>
> <step type="spatial" name="xy" line="false" polygon="false"
> jump-start="true" default="point" format="delim" reproject="EPSG:4326">
> </step>
> </service>
>
> <service name="streetview" display="false" target="_blank">
> <url>php/streetview.php</url>
> <step type="spatial" name="xy" line="false" polygon="false"
> jump-start="true" default="point" format="delim" reproject="EPSG:4326">
> </step>
> </service>
>
> <service name="feature_report" display="false">
> <url>php/feature_report.php</url>
> <input type="hidden" name="layers" value="lmic/fsa"/>
> <input type="hidden" name="src"/>
> <input type="hidden" name="PIN"/>
> </service>
>
> <service name="select" title="Select">
> <url>php/select.php</url>
>
> <!-- Send a selection shape + the visible layers list to the
> service
> -->
> <step type="spatial" showTools="true" name="shape" line="true"
> polygon="true" point="true" default="polygon" edit-polygon="false"
> pan="false" jump-start="true">
>
> <header><![CDATA[Create a selection area by clicking on the
> map.]]></header>
>
> <input type="visiblelayers" name="layers"/>
>
> <!--
> Option values should be the mapbook path to the layer.
> This only supports 'mapserver'-type layers.
> -->
> <input type="select" name="select_layer" title="Select:">
> <option value="parcels/parcels">Parcels</option>
> </input>
>
> <!--
> <input type="user" name="shape_buffer" title="Buffer Selection
> Shape (ft)">0</input>
>
> <input type="select" name="query_layer" title="Using Features
> In">
>
> <option value="parcels/parcels">Parcels</option>
> </input>
> -->
> <input type="user" name="shape_buffer" title="Buffer Selection
> Shape (ft)">0</input>
>
> <footnote><![CDATA[
> ]]></footnote>
> </step>
> </service>
>
> <!-- this is called after a standard select in order to buffer the
> previous selection -->
> <service name="buffered_select_followup" title="Buffered Select">
> <url>php/select.php</url>
> <step type="input">
> <input type="hidden" name="shape"/>
> <input type="hidden" name="select_layer"/>
> <input type="hidden" name="query_layer"/>
> <input type="hidden" name="shape_buffer"/>
> <input type="user" name="selection_buffer" title="Buffer
> Features By: "/>
> </step>
> </service>
>
> <service name="buffered_select" title="Buffered Select">
> <url>php/select.php</url>
>
> <!-- Send a selection shape + the visible layers list to the
> service
> -->
> <step type="spatial" showTools="true" name="shape" line="true"
> polygon="true" point="true" default="polygon" edit-polygon="false"
> pan="false">
>
> <header><![CDATA[Create a selection area by clicking on the
> map.]]></header>
>
> <input type="visiblelayers" name="layers"/>
>
> <!--
> Option values should be the mapbook path to the layer.
> This only supports 'mapserver'-type layers.
> -->
> <input type="select" name="select_layer" title="Select
> features
> from:">
> <option value="parcels/parcels">Parcels</option>
> </input>
>
> <input type="user" name="selection_buffer" title="Buffer
> Selected Features (ft)">0</input>
>
> <!-- <input type="user" name="shape_buffer" title="Buffer
> Selection Shape (ft)">0</input>
> -->
> <input type="select" name="query_layer" title="Using Features
> In">
>
> <option value="parcels/parcels">Parcels</option>
> </input>
>
> <footnote><![CDATA[
> ]]></footnote>
> </step>
> </service>
>
> <service name="popups" display="false">
> <url>php/popups.php</url>
> <step type="spatial" name="shape" line="false" polygon="false"
> jump-start="true" default="point">
> <header><![CDATA[
> Click on the map to show a popup about the features.
> ]]></header>
> <input type="hidden" name="layer"/>
> </step>
> </service>
>
> <service name="geocode_address" title="Geocode Address">
> <url>php/geocode.php</url>
> <step type="input">
> <input type="user" name="address" title="Enter Address: "/>
> <input type="hidden" name="googlekey"
> value="ABQIAAAA4Q-VLyIpwp3L8M9DIzKb2BT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRe8Hd6FR51Hvb-Fvd-wGjiDZDC4w"/>
> </step>
> </service>
>
> <service name="search_parcels">
> <url>php/query.php</url>
> <step type="input">
> <input type="hidden" name="highlight" value="true"/>
> <input type="hidden" name="mode" value="search"/>
>
> <input type="hidden" name="layer0" value="parcels/parcels"/>
> <input type="hidden" name="template0" value="itemquery"/>
>
> <input type="select" name="fieldname0" title="Search By:">
> <option value="OWNER_NAME">Owner</option>
> <option value="PIN">Parcel ID</option>
> </input>
> <input type="select" name="comparitor0" title="That: ">
> <option value="like-icase">Contains</option>
> <option value="right-like-icase">Begins With</option>
> <option value="eq-str">Matches Exactly</option>
> </input>
> <input type="user" name="value0" title=""/>
>
> <input type="hidden" name="fieldname1" value="FIN_SQ_FT"/>
> <input type="select" name="operator1">
> <option value="or">OR</option>
> <option value="and">AND</option>
> </input>
> <input type="select" name="comparitor1" title="Having Fin. Sq.
> Ft. ">
> <option value="gt">Greater Than</option>
> <option value="eq">Equal To</option>
> <option value="lt">Less Than</option>
> </input>
> <input type="user" name="value1" title=""/>
> </step>
> </service>
>
> <!--
> The catalog defines how the layers will be displayed in the
> catalog
> tab.
> -->
> <layer-controls>
> <layer-control name="popups" service-name="popups"
> layer-input="layer" on="false" tip="Show Popups for %LAYER%"/>
> </layer-controls>
> <catalog>
>
> <!-- <layer title="overallmap" src="parcels/parcels" status="on"
> popups="true" minscale="0" maxscale="150000" metadata="true" >
> <metadata>http://www.aqua3.com</metadata>
> </layer>
> <layer title="City and County Boundaries" src="borders/all"
> status="on"/>
>
> <layer title="Weather Radar" src="iastate/nexrad-n0r" status="off"
> legend="false"/>
>
> <group title="Backgrounds" expand="true" multiple="false">
> <layer title="Metro Base Map" src="metbase/Met Council Base
> Map
> Layers" status="on" legend="false" />
> <layer title="2008 Aerial Photographs" src="lmic/fsa2008"
> status="off" legend="false" />
> <layer title="1997 Aerial Photographs" src="lmic/bw1997"
> status="off" legend="false" />
> <layer title="USGS DOQs" src="usgs_doq/DOQ" status="off"
> fade="true" unfade="true" legend="false" />
> <layer title="USGS Topo Quads" src="usgs_drg/DRG" status="off"
> fade="true" unfade="true" legend="false" />
> <layer title="None" src=" " status="off" legend="false"
> fade="false" unfade="false" />
>
> </group> -->
> </catalog>
>
> <!--
> The toolbar defines which services are referneces in the toolbar
> -->
> <toolbar>
> <tool name="previous" title="Previous Extent" type="internal"
> action="previous" selectable="false"/>
> <tool name="next" title="Next Extent" type="internal"
> action="next"
> selectable="false"/>
> <tool name="fullextent" title="Zoom to Full Extent"
> type="internal"
> action="fullextent" selectable="false"/>
> <tool name="pan" title="Pan" type="internal" action="pan"/>
> <tool name="zoomin" title="Zoom In" type="internal"
> action="zoomin"
> selected="true"/>
> <tool name="zoomout" title="Zoom Out" type="internal"
> action="zoomout"/>
> <!-- <tool name="identify" title="Identify" type="service"
> service="identify" cursor="url('cursors/identify2.cur') 9
> 9,url('cursors/identify2.cur'),auto" /> -->
> <!-- <tool name="select" title="Select" type="service"
> service="select"/> -->
> <!-- <tool name="buffered_select" title="Buffered Select"
> type="service" service="buffered_select"/> -->
> <!-- <tool name="clear" title="Clear Selection"
> type="javascript"
> selectable="false">
> GeoMOOSE.changeLayerVisibility('highlight/all', false);
> </tool> -->
> <tool name="measure" title="Measure" type="internal"
> action="measure"/>
> <tool name="measurearea" title="Measure Area" type="internal"
> action="measurearea"/>
> <!-- <tool name="search_parcels" title="Search Parcels"
> type="service" service="search_parcels" selectable="false"/> -->
> <!-- <tool name="print" title="Print" type="service"
> service="print"
> selectable="false"/> -->
> <!-- <tool name="birdseye" title="Bird's Eye View" type="service"
> selectable="true" service="birdseye"/> -->
> <!-- <tool name="streetview" title="Google Street View"
> type="service" service="streetview" selectable="true"/> -->
> <!-- <tool name="geocode" title="Geocode Address" type="service"
> service="geocode_address" selectable="true"/> -->
> <!-- <drawer>
> <tool name="markup_tools" title="Sketch Tools" type="internal"
> action="none" selectable="false"/>
> <tool name="draw_polygon" title="Draw Polygon" type="internal"
> action="draw_polygon"/>
> <tool name="draw_line" title="Draw Line" type="internal"
> action="draw_line"/>
> <tool name="draw_point" title="Draw Point" type="internal"
> action="draw_point"/>
> <tool name="draw_remove" title="Remove Drawing"
> type="internal"
> action="draw_remove"/>
> <tool name="draw_edit" title="Edit Drawing" type="internal"
> action="draw_edit_shapes"/>
> <tool name="draw_edit_attributes" title="Edit Attributes"
> type="internal" action="draw_edit_attributes"/>
> <tool name="clear_drawings" title="Clear Drawings"
> type="internal" action="clear_drawings" selectable="false"/>
> </drawer> -->
> </toolbar>
> </mapbook>
>
> ============= END OF MAPBOOK.XML =============
>
> I have tried getting some error reporting out of firebug with little
> success, if anyone can help me spot what I have done wrong it would be
> much
> appreciated and I would be happy to supply the real url's to the server
> off-list.
>
> Cheers
>
> Carl
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl_______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>
Best Regards
Brent Fraser
More information about the Geomoose-users
mailing list