Skip to content

Commit 804e300

Browse files
committed
Fix Tile HTML highlighting
1 parent ae97bea commit 804e300

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygeoapi/templates/collections/tiles/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h3>Tiles</h3>
108108
maxZoom: {{ data['maxzoom'] }},
109109
indexMaxZoom: 5,
110110
getFeatureId: function(feat) {
111-
return feat.properties["id"]
111+
return feat.id || feat.properties.id || feat.properties.uri;
112112
}
113113
};
114114

@@ -129,7 +129,7 @@ <h3>Tiles</h3>
129129
.openOn(map);
130130

131131
clearHighlight();
132-
highlight = e.layer.properties.id;
132+
highlight = e.layer.id || e.layer.properties.id || e.layer.properties.uri;
133133
tilesPbfLayer.setFeatureStyle(highlight, {
134134
weight: 2,
135135
color: 'red',

0 commit comments

Comments
 (0)