Google Maps API Search Box: Using exact lats and longs -
i'm trying google map in browser go exact decimal-degree locations typing them search box. i've set search box per api docs except removed biasing toward current location.
these seems work reasonably if 'place' near coordinates want, doesn't if there nothing there. users typically searching rural locations there 'nothing there', want go there anyway (e.g., searching 0, 0 should take me sea off west africa). know can use 0n, 0e - of users want use +/- not cardinal compass points (i.e. -90 +90 , -180 +180, not n, s, e, w).
ideally, don't want separate control - search box integrated , want.
is there way force search box go coordinates regardless? (assuming +ve n , e, -ve s , w)
(bonus points if there way allow accept utm locations google earth :) )
edit:
the code per api docs here:
https://developers.google.com/maps/documentation/javascript/examples/places-searchbox
with section removed:
// bias searchbox results towards current map's viewport. map.addlistener('bounds_changed', function() { searchbox.setbounds(map.getbounds()); });
Comments
Post a Comment