[Geomoose-users] Identify and itemquery (Search)

Michael Reynolds Mike.Reynolds at dot.state.mn.us
Sun Oct 25 13:18:47 EDT 2009


I have a feature class in oracle that displays fine in geomoose.  The identify tool also works with this layer.  The problem is, I cannot get the Search service to work.

I feel I'm close if the data displays and I can identify a feature.  But why would the itemquery.php not work?  I receive no errors but the info tab says "no results found for your query".

When I watched what was going on in the itemquery.php I found that $queryLayer->getExtent() against this particular layer is returning no extent or zero values.  This seems to indicate bad communication between itemquery.php, mapserver, and oraclespatial. 

Anyone familiar with mapserver oraclespatial connections that can give me a tip on my DATA line in my mapfile or any other tips? 

My map-source in the mapbook.xml looks like this:

	<map-source name="lit_cabinets" type="mapserver">
		<file>./mte/lighting/lit_cabinets.map</file>
		<layer name="lit_cabinets"/>
	</map-source>


My service in the mapbook.xml looks like this:

	<service name="search_cabinets">
		<url>php/itemquery.php</url>
		<step type="input">
			<input type="select" name="qitem" title="Search By:">
				<option value="CABINET_ID">Cabinet ID</option>
				<option value="SYSTEM_ID">System ID</option>
			</input>
			<input type="user" name="qstring" title=""/>
			<input type="hidden" name="layer" value="lit_cabinets/lit_cabinets"/>
			<input type="hidden" name="zoom_to_first" value="true"/>
			<input type="hidden" name="highlight" value="true"/>
		</step>
	</service>

My layer in the mapbook.xml looks like this:

			<layer title="Cabinets" src="lit_cabinets/lit_cabinets"/>		

The mapfile looks like this:

MAP
	NAME 'lit_cabinets'
	SIZE 800 650
	STATUS ON
	EXTENT 189783.560000 4816309.330000 761653.524114 5472346.500000
	UNITS METERS
	FONTSET "../../fonts/fontset.list"
	INCLUDE "../../geomoose_globals.map"

	WEB
		INCLUDE "../../temp_directory.map"
	END
	
	LEGEND
	   STATUS ON
	   LABEL
			TYPE TRUETYPE
			FONT vera_sans
			SIZE 8
			COLOR 0 0 0
	   END		
	END	

	LAYER
		NAME 'lit_cabinets'
	   CONNECTIONTYPE oraclespatial
	   CONNECTION "username/password at tgd"
	   #DATA 'SHAPE FROM username.LIT_CABINETS USING UNIQUE OBJECTID'
	   DATA 'SHAPE FROM (SELECT OBJECTID, CABINET_ID, SYSTEM_ID, LAYOUT_URL, ROADWAY_NAME, DATE_LOGGED, DATE_INSTALLED, DATE_TURNON, DATE_RETIRED, LOCATION, QUAD, METER_VENDOR, METER_ACCOUNT, METER_ADDRESS, METER_NBR, PREMISE_NBR, OWNER_CODE, CABINET_TYPE, CABINET_VOLTS, GEOMSRC_CODE, SHAPE, GLOBALID FROM username.LIT_CABINETS) USING UNIQUE OBJECTID' 
		PROCESSING "CLOSE_CONNECTION=DEFER"	   
		STATUS DEFAULT
		TYPE POINT
		LABELITEM 'CABINET_ID'
		LABELMAXSCALEDENOM 15000
		CLASS
			NAME 'Cabinets'
			STYLE
				SYMBOL 'square'
				COLOR 0 150 150
				SIZE 8
			END
			LABEL
			  COLOR 0 50 50
			  BACKGROUNDCOLOR 200 200 200
			  TYPE TRUETYPE
			  FONT verdana
			  SIZE 8
			  ANTIALIAS TRUE
			  POSITION UC
			  BUFFER 4
			  OFFSET 5 5
			END 
		END
		METADATA
	   	'identify_record'	'identify_lit_cabinet.html'
	   #   'select_record'	'select_lit_cabinet.html'
		#	'select_header' 'select_header_lit_cabinet.html'
		#	'popups' 'lit_pole_popup.html'
			'itemquery'	'lit_cabinet_itemquery.html'
#			'itemquery-filteritem' 'CABINET_ID'
			'itemquery-filter'	'/.*[qstring].*/i' 
		#	'qstring_validation_pattern' '.'
			
		# Feature reports are stored in the conf/feature_report directory.
		#	'feature_report' 'lit_pole.xml'
		END
      TOLERANCE .05		   	
	END 
END ## end Map







More information about the Geomoose-users mailing list