Skip To Content

Find places and addresses

In this topic

Version 3.7

Find locations quickly

The Geocoder component provides easy map navigation by adding a search box. This search box enables you to move to a location much quicker and easier than standard panning/zooming. The search box provides the search capabilities based on a given locator service and/or map services.


  • Adobe Flash Builder 4.5.1 (or later)
  • Download a copy of the ArcGIS API for Flex. The Geocoder component was made available at version 3.2 so make certain to download this version or later.

The following steps assume you have completed the steps necessary to create a new project and add the Flex API library as discussed in the Getting started topic.

  1. In Flash Builder, create a new project and make certain to add the Flex API library and reference the esri namespace.
  2. In the Editor View, add the MXML below to create a map with a set spatial reference and extent and add a basemap layer
    <s:Application xmlns:fx=""
    <esri:Map id="map">
          <esri:WebMercatorExtent xmin="-20119163" ymin="1160734" xmax="-1333999" ymax="10416341"/>

    The ArcGISTiledMapServiceLayer.url defaults to

  3. Next, add the Geocoder component.

    No Geocoder URL is set as it defaults to the ArcGIS Online World Geocoding Service. This can be set to work with another defined geocoding service, or layers within a map service. If using your own geocode locator service, it will need to be configured to use single line style similar to how the default locator service is configured.

  4. Last, save and run the application.
  5. Enter a place or address to find.

Geocoder component

You should see something similar to what is displayed in the screen capture below.

Finding Redlands, CA

Finding places and addresses does not require a lot of coding when working with the provided Geocoding component. This component bundles a lot of the functionality within it so all you need to do is reference it in your code. We were able to determine a provided place name in just a few steps. Conceptually, this is how the code breaks down:

  • Set a map with a given extent and spatial reference
  • Add a basemap layer
  • Add the Geocoding component

Additional information

If you are interested in reading more about finding place and address functionality, please see the Geocoder topic.