Skip to content

Commit

Permalink
fixed IE11 address search issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sanak committed Aug 2, 2019
1 parent c052fc8 commit 1c4bc05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,9 @@ var App = (function ($, publ) {
var address = $("button.btn-geocode").prev("input").val()
$.getJSON("https://***REMOVED***/geocode/json/" + encodeURIComponent(address), function(data) {
if (data.result.code >= 0 && data.result.coordinates) {
var coords = [data.result.coordinates.x, data.result.coordinates.y];
var geom = new ol.geom.Point(
ol.proj.fromLonLat(Object.values(data.result.coordinates), 'EPSG:3857','EPSG:4326')
ol.proj.fromLonLat(coords, 'EPSG:3857','EPSG:4326')
)
var features = vector.getSource().getFeatures();
if (features.length > 0) {
Expand Down

0 comments on commit 1c4bc05

Please sign in to comment.