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...).
Any ideas?
Hi Yannick,
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
Look :)
Strange Look:
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
https://github.com/TimGeyssens/LocatorRazorStyle/blob/master/TestSite/Views/MacroPartials/SeekAndDestroy.cshtml
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
https://github.com/TimGeyssens/LocatorRazorStyle/blob/master/GeoCodingTest/Umbraco/LocatorApiController.cs
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
getting strange behavior for "harlem"
When I search for "harlem" the map shows Haarlem, The Netherlands, but the results lists shows stores in New York, USA (harlem area...).
Any ideas?
Hi Yannick,
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
Look :)
Strange Look:
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
https://github.com/TimGeyssens/LocatorRazorStyle/blob/master/TestSite/Views/MacroPartials/SeekAndDestroy.cshtml
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
https://github.com/TimGeyssens/LocatorRazorStyle/blob/master/GeoCodingTest/Umbraco/LocatorApiController.cs
you won't need
but can then just create the searchLocation from the passed in coordinates
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.