Skip to content

Commit

Permalink
fix: remove reverse coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
tomickigrzegorz committed Jan 27, 2024
1 parent ea98849 commit 1b17437
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 2 additions & 10 deletions docs/45.multi-layer-search/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ new Autocomplete("multi-layer-serch", {

// fly to the place and open popup
onSubmit: ({ object }) => {
const cord = object.geometry.coordinates.reverse();
const [lat, lng] = object.geometry.coordinates;

// fly to coordinates
map.flyTo(cord);
map.flyTo([lng, lat]);

// find marker in the layer and open it
poiLayers.eachLayer(function (layer) {
Expand All @@ -143,14 +143,6 @@ new Autocomplete("multi-layer-serch", {
}
});
});

// map.eachLayer(function (layer) {
// if (layer.options && layer.options.pane === "markerPane") {
// if (layer.feature.id === object.id) {
// layer.openPopup();
// }
// }
// });
},

// no results
Expand Down
5 changes: 5 additions & 0 deletions docs/45.multi-layer-search/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,8 @@ body {
height: 30px;
margin-right: 5px;
}

.max-height ul {
max-height: 350px;
overflow: auto;
}

0 comments on commit 1b17437

Please sign in to comment.