Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/5563'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 28, 2025
2 parents b17f254 + 0a6d1a8 commit 09e802b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/index/layers/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ OSM.initializeDataLayer = function (map) {

dataLoader = $.ajax({
url: url,
success: function (xml) {
dataType: "json",
success: function (data) {
dataLayer.clearLayers();

var features = dataLayer.buildFeatures(xml);
var features = dataLayer.buildFeatures(data);

function addFeatures() {
$("#browse_status").empty();
Expand Down
6 changes: 3 additions & 3 deletions app/assets/javascripts/leaflet.map.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ L.OSM.Map = L.Map.extend({
var map = this;
this._objectLoader = $.ajax({
url: OSM.apiUrl(object),
dataType: "xml",
success: function (xml) {
dataType: "json",
success: function (data) {
map._object = object;

map._objectLayer = new L.OSM.DataLayer(null, {
Expand All @@ -335,7 +335,7 @@ L.OSM.Map = L.Map.extend({
}
};

map._objectLayer.addData(xml);
map._objectLayer.addData(data);
map._objectLayer.addTo(map);

if (callback) callback(map._objectLayer.getBounds());
Expand Down

0 comments on commit 09e802b

Please sign in to comment.