From 1c4bc0536a4bf65d06c3800335a01da2435405db Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Fri, 2 Aug 2019 13:50:49 +0900 Subject: [PATCH] fixed IE11 address search issue --- assets/javascripts/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 320acc61..acc53861 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -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) {