AnsweredAssumed Answered

World Geocoder Locator result point offset? (search widget)

Question asked by SnoBrdinRTiste on Jul 2, 2015
Latest reply on Jul 7, 2015 by SnoBrdinRTiste

Hello,

Is there a way to have the returned result point be offset to be either on the right or left side of the street?

I would use a custom locator from our ArcGIS Server's locator but its not as up to date as the world geocoder provided as default in the search widget.

Here's the snippet of code i'm using:

 

search = new esri.dijit.Search({
  enableButtonMode: false,
  enableLabel: false,
  enableInfoWindow: false,
  autoComplete: true,
  map: map,
  sources: 
  [
   {
     locator: new Locator("//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"),
     singleLineFieldName: "SingleLine",
     outFields: ["Addr_type"],
     name: "world_geocoder",
     localSearchOptions: {
          minScale: 300000,
          distance: 50000
     },
     placeholder: "Search Place or Address",
     highlightSymbol: new esri.symbol.PictureMarkerSymbol("images/pins/red-pin.png", 17, 32).setOffset(18, 27)
   }
  ]
}, "searchAddress");
search.startup();

 

as you can see, the offset is set on the picturemarkersymbol and was taken from an example in the arcgis javascript api documentation.

however, its incorrect as the offset will always be at a fixed point... i need the correct offset set by the locator.

any insight would be appreciated.

Outcomes