<bufferunits> <bufferunit> <name>UNIT_STATUTE_MILE</name> <label>Miles</label> </bufferunit> <bufferunit> <name>UNIT_FOOT</name> <label>Feet</label> </bufferunit> <bufferunit> <name>UNIT_METER</name> <label>Meters</label> </bufferunit> <bufferunit> <name>UNIT_KILOMETER</name> <label>Kilometers</label> </bufferunit> </bufferunits>
queryGeom = map.extent; // select entities at screen extent
//////////////////////////////////////////////////////////////////////////////// // // Version 1.0 - Nov 24, 2010 // // Delevoped by Robert Scheitlin // //////////////////////////////////////////////////////////////////////////////// package com.esri.viewer.utils { public class GlobalVarContainer { public var vars:Object = {}; public var searchurl:String = "" ; private static var _container:GlobalVarContainer; private static var _lock:Boolean = false; public static function getInstance():GlobalVarContainer { if (!_lock) { _container = new GlobalVarContainer(); _lock = true; } return _container; } } }
GlobalVarContainer.getInstance().searchurl = "Blah blah";
x = GlobalVarContainer.getInstance().searchurl;
<layer> <name>Owner Parcels</name> <url>http://gis.calhouncounty.org/ArcGIS2/rest/services/parcelviewer/MapServer/67</url> <expression useforspatial="false">upper(PPIN) = upper('[value]%')</expression> <textsearchlabel>Search Parcel by PPIN... [ Example: 1234 ]</textsearchlabel> <graphicalsearchlabel>Use one of the graphical search tools to select Parcel</graphicalsearchlabel> <spatialsearchlabel>Select the two layers for spatial query</spatialsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <spatialrelationlayer>true</spatialrelationlayer> <titlefield>NAME</titlefield> <fields all="false"> <field name="PPIN" gridfield="true" /> <field name="NAME" gridfield="true" /> <field name="STREET_ADDRESS" gridfield="true" /> <field name="USE_CODE" gridfield="true" /> <field name="CALC_ACRES" gridfield="true" /> <field name="EXEMPTION_CODE1" gridfield="true" /> <field name="ADDRESS_1" gridfield="true" gridfieldonly="true" /> <field name="ADDRESS_3" gridfield="true" gridfieldonly="true" /> <field name="PRIOR_TAX_YEAR" gridfield="true" /> <field name="SALE_DATE" gridfield="true" dateformat="MM/DD/YYYY"/> <field name="LAST_DEED_BOOK" gridfield="true"/> <field name="LAST_DEED_PAGE" gridfield="true"/> <field name="ZIPCODE_1" gridfield="true" gridfieldonly="true"/> <field name="NEIGHBORHOOD" gridfield="true" gridfieldonly="true"/> <field name="SUBDIVISION" gridfield="true"/> <field name="SALE_PRICE" gridfield="true" currencyformat="$|2|,|."/> <field name="TOTAL_TRUE" gridfield="true" currencyformat="$|2|,|." /> <field name="LAND_PRICE" gridfield="true" currencyformat="$|2|,|." /> <field name="IMPR_PRICE" gridfield="true" currencyformat="$|2|,|." /> <field name="ADJ_PRICE" gridfield="true" currencyformat="$|2|,|." /> <field name="OVER_COND" alias="PAPA Website Link" hyperlinkgridfield="true" hyperlinkaliastext="Click Here For PAPA Website" linkprefix="http://www.co.palm-beach.fl.us/PAPA/aspx/web/detail_info.aspx?p_entity=" linksuffix=""/> </fields> <linkfield linkprefix="http://www.co.palm-beach.fl.us/PAPA/aspx/web/detail_info.aspx?p_entity=" linksuffix="">OVER_COND</linkfield> <icon isfield="true"></icon> <zoomscale>5000</zoomscale> </layer>
All, A new version (2.1.6) is available that addresses most issues or enhancements requested.
<layer> <name>Parcels</name> <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/0</url> <expression useforspatial="true">PARCELID like '%[value]%'</expression> <textsearchlabel>Search by Parcel ID [ Example: 181001490000 ]:</textsearchlabel> <graphicalsearchlabel>Use one of the graphical search tools to select incidents</graphicalsearchlabel> <spatialsearchlabel>Select the two layers for spatial query</spatialsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <spatialrelationlayer>true</spatialrelationlayer> <titlefield>PARCELID</titlefield> <fields all="false"> <field name="PARCELID" alias="Parcel Id" gridfield="true"/> </fields> <linkfield></linkfield> <icon isfield="true"></icon> <zoomscale>40000</zoomscale> </layer>
package com.esri.viewer.utils { public class GlobalVarContainer { public static var vars:Object = {}; public static var searchurl:String = "" ; } }
import com.esri.viewer.utils.GlobalVarContainer; //and within my function that specifies which map service and layer to display I try to pass the url //to the global variable searchurl for each (var item : LayerInfo in alllayers) { var lyrname:String = item.name; if (lyrname == qryname) { var lyrnum:String = item.id.toString(); var urlstr:String = lyr.url + "/" + lyrnum; GlobalVarContainer.searchurl = urlstr; visibleLayers.addItem(item.id); // add id }
import com.esri.viewer.utils.GlobalVarContainer; //and within private function init():void for (var i:Number = 0; i < lyrList.length(); i++) { //var lyrURL:String = lyrList.url; var lyrURL:String = GlobalVarContainer.searchurl;
Hello Nadeem,has Robert merged my code for the spatial search to his enhanced search, the two original part of the widget dont use the same source for the spatial reference. The spatial search use the map spatial reference instead of the wkid set in the SearchWidget.xml. I'll report this problem to Robert, he will decide wich is the best solution.Erwan.
Robert, You are running into a very common issue with any attempt to globalize measurements and get accurate results. The best thing to do is use a UTM 1983 zone that is specific to your area of concern and that will provide you the best results.
Nestor, It will work if you add the linkprefix and linksuffix to the field element that is the hyperlink field.
<layer> <name>Parcel Name</name> <url>http://gissrv1/ArcGIS/rest/services/Cadastral/MapServer/3</url> <expression useforspatial="true">OWNERNAME1 LIKE '%[value]%'</expression> <textsearchlabel>Search by Owner Name [Example: Smith; Smith Robert]:</textsearchlabel> <graphicalsearchlabel>Use one of the graphical search tools to select features</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <spatialrelationlayer>true</spatialrelationlayer> <titlefield>PARID</titlefield> <linkfield linkprefix="http://www.co.palm-beach.fl.us/papa/aspx/web/detail_info.aspx?p_entity=" linksuffix="">PAPA</linkfield> <fields all="false"> <field name="PARID" gridfield="true"/> <field name="OWNERNAME1" gridfield="true"/> <field name="OWNERNAME2" gridfield="true"/> <field name="SITEADDR" gridfield="true"/> <field name="PROPUSE" gridfield="true"/> <field name="ACRES" gridfield="true"/> <field name="EXEMPTION" gridfield="true" gridfieldonly="true"/> <field name="PADDR1" gridfield="true" gridfieldonly="true"/> <field name="PADDR3" gridfield="true" gridfieldonly="true"/> <field name="YEAR_ADDED" gridfield="true" gridfieldonly="true"/> <field name="SALE_DATE" dateformat="MM/DD/YYYY" gridfield="true" gridfieldonly="true"/> <field name="BOOK" gridfield="true" gridfieldonly="true"/> <field name="PAGE" gridfield="true" gridfieldonly="true"/> <field name="ZIP1" gridfield="true" gridfieldonly="true"/> <field name="MUNI" gridfield="true" gridfieldonly="true"/> <field name="SUBDIVNAM" gridfield="true"/> <field name="PRICE" gridfield="true" gridfieldonly="true"/> <field name="TOTMRKTVAL" gridfield="true" gridfieldonly="true"/> <field name="ASSESSVAL" gridfield="true" gridfieldonly="true"/> <field name="LANDVAL" gridfield="true" gridfieldonly="true"/> <field name="IMPRV_MRKT" gridfield="true" gridfieldonly="true"/> <field name="TOTALVALUE" gridfield="true" gridfieldonly="true"/> <field name="TOTTAXVAL" gridfield="true" gridfieldonly="true"/> <field name="PAPA" alias="PAPA Website Link" hyperlinkgridfield="true" hyperlinkaliastext="Click Here For PAPA Website" linkprefix="http://www.co.palm-beach.fl.us/papa/aspx/web/detail_info.aspx?p_entity=" linksuffix=""/> </fields> <zoomscale>2400</zoomscale> </layer>
Nestor, Is this only happening in the floating grid or in the widget results as well?
<layer> <name>Parcel Name</name> <url>http://gissrv1/ArcGIS/rest/services/Cadastral/MapServer/3</url> <expression useforspatial="true">OWNERNAME1 LIKE '%[value]%'</expression> <textsearchlabel>Search by Owner Name [Example: Smith; Smith Robert]:</textsearchlabel> <graphicalsearchlabel>Use one of the graphical search tools to select features</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <spatialrelationlayer>true</spatialrelationlayer> <titlefield>PARID</titlefield> <linkfield linkprefix="http://www.co.palm-beach.fl.us/PAPA/aspx/web/detail_info.aspx?p_entity=" linksuffix="">PAPA</linkfield> <fields all="false"> <field name="PARID" gridfield="true"/> <field name="OWNERNAME1" gridfield="true"/> <field name="OWNERNAME2" gridfield="true"/> <field name="SITEADDR" gridfield="true"/> <field name="PROPUSE" gridfield="true"/> <field name="ACRES" gridfield="true"/> <field name="EXEMPTION" gridfield="true" gridfieldonly="true"/> <field name="PADDR1" gridfield="true" gridfieldonly="true"/> <field name="PADDR3" gridfield="true" gridfieldonly="true"/> <field name="YEAR_ADDED" gridfield="true" gridfieldonly="true"/> <field name="SALE_DATE" dateformat="MM/DD/YYYY" gridfield="true" gridfieldonly="true"/> <field name="BOOK" gridfield="true" gridfieldonly="true"/> <field name="PAGE" gridfield="true" gridfieldonly="true"/> <field name="ZIP1" gridfield="true" gridfieldonly="true"/> <field name="MUNI" gridfield="true" gridfieldonly="true"/> <field name="SUBDIVNAM" gridfield="true"/> <field name="PRICE" gridfield="true" gridfieldonly="true"/> <field name="TOTMRKTVAL" gridfield="true" gridfieldonly="true"/> <field name="ASSESSVAL" gridfield="true" gridfieldonly="true"/> <field name="LANDVAL" gridfield="true" gridfieldonly="true"/> <field name="IMPRV_MRKT" gridfield="true" gridfieldonly="true"/> <field name="TOTALVALUE" gridfield="true" gridfieldonly="true"/> <field name="TOTTAXVAL" gridfield="true" gridfieldonly="true"/> <field name="PAPA" alias="PAPA Website Link" hyperlinkgridfield="true" hyperlinkaliastext="Click Here For PAPA Website"/> </fields> <zoomscale>2400</zoomscale> </layer>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.