diff --git a/app/components/geolocation-control.js b/app/components/geolocation-control.js index 1f308f37..bb361737 100644 --- a/app/components/geolocation-control.js +++ b/app/components/geolocation-control.js @@ -98,6 +98,14 @@ export default Ember.Component.extend({ return; } + var coords = value.split(','); + var lat = parseFloat(coords[0]) || null; + var lng = parseFloat(coords[1]) || null; + if (typeof lat === 'number' && typeof lng === 'number') { + component.set('control.value', { latitude: lat, longitude: lng }); + return; + } + // Use Google Geocoding service for address lookups. Ember.$.getJSON('https://maps.googleapis.com/maps/api/geocode/json', { address: value