Only perform URL search once, not every time map tiles change

This commit is contained in:
Rohan Mitchell
2016-07-06 11:56:41 +10:00
parent f09cd9e477
commit d3c423f7ce

View File

@@ -42,7 +42,7 @@ Darkswarm.directive 'mapSearch', ($timeout, Search) ->
# When the map loads, and we have a search from ?query, perform that search
scope.performUrlSearch = (map) ->
google.maps.event.addListener map, "tilesloaded", =>
google.maps.event.addListenerOnce map, "idle", =>
google.maps.event.trigger(scope.input, 'focus');
google.maps.event.trigger(scope.input, 'keydown', {keyCode: 13});