Near Me

The Near Me widget allows you to find features within a buffer of a defined address or location, view detailed information about those features, and get directions to the selected feature if desired.

Additionally, the Near Me widget can be configured to find polygon features containing a defined address or location instead of polygon features within the buffer.

The following table lists the configurable attributes of the Near Me widget:

AttributeDescription

fontColor

String. The default value is #000000. This is the color displayed in the title section of the search results.

bufferInfo

Object. The properties of the array item are as follows:

  • isVisible—Boolean. The default value is false. Use the true value to display the buffer area on the map.

zoomToFeature

Boolean. The default value is false. Use the true value to zoom to the selected feature rather than the buffer extent.

intersectSearchedLocation

Boolean. The default value is false. Use the true value to return the polygon or polygons containing the searched location rather than polygons within the buffer.

defaultBufferDistance

Number. The default value is 5. Defines the default value of the buffer slider.

bufferDistanceUnit

Object. The properties of the array item are as follows:

  • bufferUnit—String. The default value is UNIT_STATUTE_MILE. Unit of measure for the buffer size.
  • routeUnit—String. The default value is MILES. Unit of measure for routing.
  • distanceUnit—String. The default value is MILES. Unit of measure when reporting distances.
  • label—String. The default value is MILES. Used as a long label for distances.
  • acronym—String. The default value is MILES. Used as a short label for distances.
  • value—String. The default value is MILES.

directionLengthUnit

Object. The properties of the array item are as follows:

  • bufferUnit—String. The default value is UNIT_STATUTE_MILE. Unit of measure for the buffer size.
  • routeUnit—String. The default value is MILES. Unit of measure for routing.
  • distanceUnit—String. The default value is MILES. Unit of measure when reporting distances.
  • label—String. The default value is MILES. Used as a long label for distances.
  • acronym—String. The default value is MILES. Used as a short label for distances.
  • value—String. The default value is MILES.

symbols

Object. The properties of the array item are as follows:

  • bufferSymbol—Object. The properties of the array item are as follows:
    • Color—List of RGB values for the symbol fill. the default value is [255,0,0,0].
    • Outline—Object. The properties of the array item are as follows:
      • Color—List of RGB values for the symbol outline. The default value is [255,189,1,255].
      • Width—Number. The default value is 2.25. the width of the outline.
      • Type—String. The default value is esriSLS. The name of the symbol type to use for the outline.
      • Style—String. The default value is esriSLSSolid. The name of the style library to which the outline symbol belongs.
    • Type—String. The default value is esriSFS. The name of the symbol type to use for the fill.
    • Style—String. The default value is esriSFSSolid. The name of the style library to which the fill symbol belongs.
  • routeSymbol— Object. The properties of the array item are as follows:
    • Color—List of RGB values for the route symbol. The default value is [21,99,184,255].
    • Width—Number. The default value is 3.75. The width of the route symbol.
    • Type—String. The default value is esriSLS. The name of the symbol type to use for the line.
    • Style—String. The default value is esriSLSSolid. The name of the style library to which the line symbol belongs.
  • graphicLocationSymbol—Object. The properties of the array item are as follows:
    • Angle—Number. The default value is 0. The angle of the symbol used to mark the searched location.
    • X-Offset—Number. The default value is 0. The x offset of the symbol used to mark the searched location.
    • Y-Offset—Number. The default value is 12. The y offset of the symbol used to mark the searched location.
    • Type—String. The default value is esriPMS. The type of symbol used to mark the searched location.
    • URL—String. The default value is http://static.arcgis.com/images/Symbols/Basic/RedStickpin.png. The URL to the graphic to use to mark the searched location.
    • imageData—String. A 64-bit encode hash string of the symbol used to mark the searched location.
    • contentType—String. The default value is image/png. The type of image that can be configured for the searched location symbol.
    • Width—Number. The default value is 22.5. The width of the searched location symbol.
    • Height—Number. The default value is 22.5. The height of the searched location symbol.
  • polygonSymbol—Object. The properties of the array item are as follows:
    • Color—List of RGB values for the symbol fill. The default value is [255,0,0,0].
    • Outline—Object. The properties of the array item are as follows:
      • Color—List of RGB values for the symbol outline. The default value is [255,189,1,255].
      • Width—Number. The default value is 2.25. The width of the outline.
      • Type—String. The default value is esriSLS. The name of the symbol type to use for the outline.
      • Style—String. The default value is esriSLSSolid. The name of the style library to which the outline symbol belongs.
    • Type—String. The default value is esriSFS. The name of the symbol type to use for the fill.
    • Style—String. The default value is esriSFSSolid. The name of the style library to which the fill symbol belongs.
  • polylineSymbol— Object. The properties of the array item are as follows:
    • Color—List of RGB values for the polyline symbol. The default value is [21,99,184,255].
    • Width—Number. The default value 3.75. The width of the polyline symbol.
    • Type—String. The default value is esriSLS. The name of the symbol type to use for the outline.
    • Style—String. The default value is esriSLSSolid. The name of the style library to which the outline symbol belongs.

showLocationTool

Boolean. The default value is false. Use the true value to add a button to the search bar that must be clicked to set a search location by clicking the map.

isGeodesic

Boolean. The default value is false. Use the true value to draw buffer and measure distances using geodesic distances.

searchSourceSettings

Object. The properties of the array item are as follows:

  • allPlaceHolder—String. The default value is "". Default placeholder text that displays in the search box.
  • showInfoWindowOnSelect—Boolean. The default value is true. A pop-up appears for the found feature or location.
  • sources—List of layers to include in the results of the search for nearby features.