Skip to content
Snippets Groups Projects
Commit 28a57130 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix popup link to feature undefined id

parent 6e8a68b5
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,6 @@ const mapService = {
addRouterToPopup(featureTypeSlug, featureId) {
function goToFeatureDetail() {
console.log(featureTypeSlug, featureId);
router.push({
name: 'details-signalement',
params: {
......@@ -393,7 +392,6 @@ const mapService = {
color : '#000000';
const rgbaColor = asArray(colorValue);
console.log({ featureType, properties });
//* set opacity from feature-type colors_style
rgbaColor[3] = this.retrieveFeatureOpacity(featureType, properties) || 0.5;//opacity
const hiddenStyle = new Style();
......@@ -545,7 +543,7 @@ const mapService = {
</div>
${author}
`;
const featureId = feature.getProperties ? feature.getProperties().feature_id : feature.id;
const featureId = feature.getProperties ? feature.getProperties().feature_id || feature.getId() : feature.id; //* feature.id was used with leaflet, with ol feature.getId replace it, but keeping it as fallback can prevent regression
return { html, feature_type, featureId };
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment