Select to view content in your preferred language

Searchbox in 3.1

2701
20
12-18-2012 03:52 AM
LemvigKommune
Deactivated User
Hi, I'm trying to use the FV 3.1, and with that using a local geocode-service.
When I use it in the header, it's like it's dropping off the earth, but if I use the same geocode-service in the locator-widget, it works like a charm.
I've added the locator that I've used as a geocode-package, hope somebody can help.
Tags (2)
0 Kudos
20 Replies
ChrisNorth
Esri Contributor
It sounds like the spatial reference of your local locator is not set properly. I'm not 100% sure, but I think that the geocoder needs to repor the spatial reference to the flex viewer so it can project the results.  What is the spatial reference for your local geocoder (look at the REST service directory).
0 Kudos
ChrisNorth
Esri Contributor
Seems I spoke too soon...

I decided to investigate this a bit further, and it seems I am having the same issue.  I have published a locator service based off some local street data (the data and locator service are both Web Mercator).  I tested the located in ArcMap first - works fine. When I call the locator service from the old "Locator" widget, it finds candidates, and shows the correct location.  When I call the exact same service form the new search box (in the Header Widget XML), it finds the candidates, but drives the map to near 0,0 lat/lon (off the coast of Africa in the Atlantic Ocean). 

So, it seems like the code behind the search box in the Header Widget is messing up the conversion from lat/lon to Web Mercator (or the other way round) - it's interpreting a lon/lat as a Web Mercator Easting/Northing.

This makes the new search box (which is a great idea) unusable as-is.

Chris
0 Kudos
ChrisNorth
Esri Contributor
Curiously.... The Search box *is* putting a pop-up window on the correct location - it's just the map centre that is being driven to 0,0.  Since the REST endpoint on the default locator is disabled, I can't figure out what is different between my local geocoder and the default (http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer)

Why is the sreach box putting a pop-up on the right location, but centering the map at 0,0?

Chris
0 Kudos
GISDev1
Deactivated User
Maybe add some traces and check for bugs regarding the function in line 642 on SingleLineSearch.mxml in com.esri.viewer.components.singleLineSearch
0 Kudos
JoshWhite
Honored Contributor
I'm very curious about this as well, I've removed this temporarily to avoid any other errors.  Please let us know what you find out.
Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
HeatherGonzago
Esri Contributor
I'm very curious about this as well, I've removed this temporarily to avoid any other errors.  Please let us know what you find out.


We've been researching this issue as well and are trying to get to the crux of the problem. We will be in touch ASAP and let you know what's going on.

Thanks again for all of your patience.
0 Kudos
JoshWhite
Honored Contributor
Thanks, honestly I'd much rather use this search than the locator widget.  I think it will more intuitive to my users who just want to quickly go to a certain address and spend 30 seconds there and then close the map.  Other widgets (except print) are more for power users.  I'm wondering if this has something to do with the fact that I'm not using Geographic or Web Mercator.  We don't use those systems at city level, not accurate/precise enough.
Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
ChrisNorth
Esri Contributor
I don't think the issue is coodrinate system.  I'm using the default ArcGIS Online basemaps (Web Mercator) and my own geocoder.  I have published two geocoders, one in WGS (lat/lon) and the other in Web Mercator and both behave the same way.  Bascially, the map is driven to lat/lon 0,0 (off the coast of Africa) but the pop-up box is placed at he correct location.  It's got to be an issue inside the widget.

I know Esri is looking into this - any updates?

Chris
0 Kudos
HeatherGonzago
Esri Contributor
Thanks for all your testing. We are actively looking at this and will respond ASAP. Thanks for your patience.

-Heather
0 Kudos