Select to view content in your preferred language

Need sample ArcGIS API for flex

2686
5
Jump to solution
06-27-2012 11:22 PM
BasuMathapati
Emerging Contributor
Hi There,

I'm newby, need urgent help to create simple web application.

I saw this flex api in 'Code Gallery' section:
http://gis.calhouncounty.org/SearchWindow/

This is what exactly I want to create ! Can I download this project ?

I tried flex API from this site, but as I'm new, I can't modify\add much in this app, especially 'Search' widget.

Thus,
I need a sample API which I can import and modify using flash builder OR flex viewer sample app.

My requirement is simple things Such as:

> My Map app should have three tabs for my operational map layers, along with basemap
> My Map app should have 'search' widget, for lot\dp\address search
> My Map app should have legend widget, which I can modify a bit to match my requirement

Your help is greatly appreciated

Thanks very much
Bas
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Bas,

   I am not sure you can be helped if you will not listen.... The Flex Viewer as a search widget and a basemap switcher and a means of switching operational layers as well.

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Welcome_to_ArcGIS_Viewer_for_Fl...

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Bas,

   It sounds like the Flex Viewer is what you need then:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Welcome_to_ArcGIS_Viewer_for_Fl...

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
BasuMathapati
Emerging Contributor
Thanks rscheitlin

But I need specifically a sample Flex API which has search function(widget) with 3 button for map switch,
where I can modify code to my maps and my fields in search tool..

Can some one please help ?
I'm desperately looking for some urgent help 😞

Bas
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bas,

   I am not sure you can be helped if you will not listen.... The Flex Viewer as a search widget and a basemap switcher and a means of switching operational layers as well.

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Welcome_to_ArcGIS_Viewer_for_Fl...
0 Kudos
BasuMathapati
Emerging Contributor
Thanks Robert,

Yes, I found that search, I was stupid that I missed from flex viewer...

Anyway, I was trying to modify search widget, my requirement is Multi field search from a table, ex: LGA>Suburb>PlanNumber>LotNumber...
I modified the SearchWidget_Search.xml but no luck, pls see below code: can you pls help ?

Thanks again

Code :
<?xml version="1.0" ?>
<configuration>
    <zoomscale>10000000</zoomscale>
    <layers>
       <layer>
            <name>Lot Parcel Search</name>
            <url>http://dc1wesrid.govnet.nsw.gov.au/ArcGIS/rest/services/Sustainability/SLRUP_CadastresWthtZ/MapServe...</url>
            <expression>LOTNUMBER = '[value]'</expression>
            <textsearchlabel>Search By Lot numbers</textsearchlabel>
            <titlefield>LOTNUMBER</titlefield>
            <fields>
                <field name="PLANNUMBER" alias="PLANNUMBER"/>
                <field name="LOTNUMBER" alias="LOTNUMBER"/>
            </fields>
        </layer>

        <layer>
       <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <name>Lot Parcel Search</name>
            <url>http://dc1wesrid.govnet.nsw.gov.au/ArcGIS/rest/services/Sustainability/SLRUP_CadastresWthtZ/MapServe...</url>
  <Expressions>
             <expression aslias="Lot And DP" textsearchlabel="Serach by DP & Lot:">
    <values>
     <value prompt="Example: 99">LOTNUMBER = '[value]' </value>
     <value prompt="Example: 870872">AND PLANNUMBER = '[value]' </value>
    </values>
   </expression>
  </expressions>
           <textsearchlabel>Search By Lot&DP numbers</textsearchlabel>
            <titlefield>PLANNUMBER</titlefield> <!--want to add multiple field here like LOT\Plan number, but dono how-->
            <fields>
                <field name="PLANNUMBER" alias="PLANNUMBER"/>
                <field name="LOTNUMBER" alias="LOTNUMBER"/>
            </fields>
        </layer>
    </layers>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Basu,

   The eSearch allows for multi-field searches, the out of the box search widget does not. You can get the eSearch here:

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Next Flex is a case sensitive language and all tags and attributes in the xml files are lower case ONLY.

Corrected xml for my eSearch:

<?xml version="1.0" ?>
<configuration>
   <layers>
            <layer>
         <definitionexpression></definitionexpression>
         <enableexport>false</enableexport>
                     <name>Lot Parcel Search</name>
                     <url>http://dc1wesrid.govnet.nsw.gov.au/ArcGIS/rest/services/Sustainability/SLRUP_CadastresWthtZ/MapServer/0</url>
            <expressions>
                <expression alias="Lot Number" textsearchlabel="Search Lot Number:">
                    <values>
                        <value prompt="Example: ???" >LOTNUMBER = '[value]'</value>
                    </values>
            </expression>
            <graphicalsearchlabel>Use one of the graphical search tools to select Traffic Cameras</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>LOTNUMBER</titlefield>
            <fields all="false">
                <field name="PLANNUMBER" alias="PLANNUMBER"/>
                                 <field name="LOTNUMBER" alias="LOTNUMBER"/>
            </fields>
            <links />
            <zoomscale>5000</zoomscale>
            <queryattachments>false</queryattachments>
        </layer>
                <layer>
                   <definitionexpression></definitionexpression>
                        <enableexport>true</enableexport>
                        <name>Lot Parcel Search</name>
                         <url>http://dc1wesrid.govnet.nsw.gov.au/ArcGIS/rest/services/Sustainability/SLRUP_CadastresWthtZ/MapServer/0</url>
              <expressions>
                             <expression alias="Lot And DP" textsearchlabel="Search by DP & Lot:">
                        <values>
                             <value prompt="Example: 99">LOTNUMBER = '[value]' </value>
                             <value prompt="Example: 870872">AND PLANNUMBER = '[value]' </value>
                        </values>
                   </expression>
              </expressions>
                       <textsearchlabel>Search By Lot&DP numbers</textsearchlabel>
                        <titlefield>PLANNUMBER</titlefield> <!--title field is what is displayed as the name\title of result and does not support multiple fields-->
            <fields>
                <field name="PLANNUMBER" alias="PLANNUMBER"/>
                <field name="LOTNUMBER" alias="LOTNUMBER"/>
            </fields>
            <links />
            <zoomscale>5000</zoomscale>
            <queryattachments>false</queryattachments>
                </layer>
    </layers>
    <tables />
    <spatialrelationships>
        <!-- possible spatial relationships esriSpatialRelIntersects | esriSpatialRelContains 
            | esriSpatialRelCrosses | esriSpatialRelEnvelopeIntersects | esriSpatialRelIndexIntersects 
            | esriSpatialRelOverlaps | esriSpatialRelTouches | esriSpatialRelWithin currently 
            unavailable: esriSpatialRelRelation -->
        <spatialrelationship>
            <name>esriSpatialRelContains</name>
            <label>entirely contained in</label>
        </spatialrelationship>
        <spatialrelationship>
            <name>esriSpatialRelIntersects</name>
            <label>interssected by</label>
        </spatialrelationship>
        <spatialrelationship>
            <name>esriSpatialRelEnvelopeIntersects</name>
            <label>intersected by envelop of</label>
        </spatialrelationship>
    </spatialrelationships>
    <bufferunits>
        <bufferunit>
            <name>UNIT_FOOT</name>
            <label>Feet</label>
        </bufferunit>
        <bufferunit>
            <name>UNIT_STATUTE_MILE</name>
            <label>Miles</label>
        </bufferunit>
        <bufferunit>
            <name>UNIT_METER</name>
            <label>Meters</label>
        </bufferunit>
        <bufferunit>
            <name>UNIT_KILOMETER</name>
            <label>Kilometers</label>
        </bufferunit>
    </bufferunits>
    <enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
    <toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
    <tolerancebydefault>false</tolerancebydefault>
    <spatialreference>102003</spatialreference>
    <zoomscale>2400</zoomscale>
    <geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
    <csvseparator>,</csvseparator>
    <disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,grid,datagrid -->
    <defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
    <enabledrawgraphicbutton>true</enabledrawgraphicbutton>
    <enablebuffergraphicbutton>true</enablebuffergraphicbutton>
    <selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
    <multipartgraphicsearch>true</multipartgraphicsearch>
    <floatorfixed>float</floatorfixed><!-- possible values are fixed and float -->
    <relatetooltip>Show Relates</relatetooltip>
    <relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
    <labels>
        <bufferusergraphics>Buffer Graphic</bufferusergraphics>
        <norelatesfound>No related features found for: </norelatesfound>
        <norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>
        <addtolerance>Add search tolerance to point selection</addtolerance>
        <existingdrawgraphicslabel>Use Existing eDraw Widget Graphics</existingdrawgraphicslabel>
        <existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>
        <graphicalsearchlabel>Graphical Search</graphicalsearchlabel>
        <textsearchlabel>Text Search</textsearchlabel>
        <resultslabel>Results</resultslabel>
        <layerlabel>Search Layer:</layerlabel>
        <layerfieldlabel>Search Layer Field:</layerfieldlabel>
        <nolayerlabel>No search layer defined.</nolayerlabel>
        <submitlabel>Search</submitlabel>
        <pointlabel>Select by Point</pointlabel>
        <linelabel>Select by Line</linelabel>
        <rectanglelabel>Select by Rectangle</rectanglelabel>
        <polygonlabel>Select by Polygon</polygonlabel>
        <clearlabel>Clear</clearlabel>
        <loadinglabel>Loading...</loadinglabel>
        <selectionlabel>Features Selected:</selectionlabel>
        <gridresultslabel>Show Results in Grid</gridresultslabel>
        <csvdefaultname>Selected Records</csvdefaultname>
        <relatescsvdefaultname>Related Records</relatescsvdefaultname>
        <exportbtnlabel>Export...</exportbtnlabel>
        <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
        <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
        <bufferlabel>apply a search distance:</bufferlabel>
        <spatialsearchlabel>Spatial search</spatialsearchlabel>
        <applybufferlabel>Apply buffer</applybufferlabel>
        <searchlayerlabel>Search entities of:</searchlayerlabel>
        <enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>
        <zoomalllabel>Zoom</zoomalllabel>
        <zoomalltip>Zoom to all results</zoomalltip>
        <bufferalpha>Adjust buffer alpha</bufferalpha>
        <buffercolor>Select buffer color</buffercolor>
    </labels>
    <symbols>
        <simplefillsymbol color="0xff0000" alpha="0.5">
            <outline color="0xff0000" alpha="0.8" width="2" />
        </simplefillsymbol>
        <!-- You can have one or the other, either simplemarkersymbol or picturemarkersymbol 
            defined for your point results NOT BOTH. picturemarkersymbol will override 
            simplemarkersymbol if you do not have it commented out. -->
        <!--<simplemarkersymbol style="square" size="12" color="0xff0000" alpha="0.5" 
            xoffset="0" yoffset="0" angle="0"> <outline style="solid" color="0x000000" 
            alpha="1" width="1"/> </simplemarkersymbol> -->
        <picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0" />
        <simplelinesymbol color="0xff0000" alpha="0.8" width="2" />
    </symbols>
</configuration>
0 Kudos