Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When I search for "harlem" the map shows Haarlem, The Netherlands, but the results lists shows stores in New York, USA (harlem area...).
What map do you use ?
google maps embedded into http://our.umbraco.org/projects/developer-tools/seek-and-destroy (the sub-forum we're in.... :))
Haarlem works fine but harlem shows harlem manhatten
So they'll just have to add the country if you get the wrong results...
So yeah it's kinda what you would expect when searching for harlem, don't see any mixed results...
wouldn't it be more logical if the map an the list both showed harlem? Instead of the map showing haarlem and the list showing harlem?
Yeah don't see mixed results when I search harlem it shows harlem manhatten
Hmm strange indeed, will check if I can spot something in the code
Yeah it's indeed 2 different blocks of code that do the lookup so maybe change the locator controller so it takes in the coordinates of the search location instead of the address again, make sense?
So if you take a look at
you see that the map lat long is available at line 170
So just send that the the controller line 219 instead of the address
and then you don't need the lookup in the controller but can just use the coordinates and it won't show different results...
So in the controller
you won't need
var r = GoogleGeoCoder.CallGeoWS(address);
but can then just create the searchLocation from the passed in coordinates
searchLocation = new Location(lat, lng);
works wonderfully! and speeds up the code even making it more efficient. Great find.
although I also like the old version of Locator where you could select from a list when there was ambiguity. But maybe this makes the UI simpler.
Great, glad it's working :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted