Fix display of updates on newly loaded notes
This commit is contained in:
parent
84f7d322d0
commit
d00994d151
1 changed files with 6 additions and 6 deletions
|
@ -71,22 +71,22 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
function updateMarker(marker, feature) {
|
||||
var icon = noteIcons[feature.properties.status];
|
||||
var popupContent = createPopupContent(marker, feature.properties);
|
||||
|
||||
if (marker)
|
||||
{
|
||||
marker.setIcon(noteIcons[feature.properties.status]);
|
||||
marker._popup.setContent(popupContent);
|
||||
marker._popup.setContent(createPopupContent(marker, feature.properties));
|
||||
}
|
||||
else
|
||||
{
|
||||
marker = L.marker(feature.geometry.coordinates.reverse(), {
|
||||
icon: icon,
|
||||
icon: noteIcons[feature.properties.status],
|
||||
opacity: 0.7
|
||||
});
|
||||
|
||||
marker.addTo(noteLayer).bindPopup(popupContent, popupOptions());
|
||||
marker.addTo(noteLayer).bindPopup(
|
||||
createPopupContent(marker, feature.properties),
|
||||
popupOptions()
|
||||
);
|
||||
}
|
||||
|
||||
return marker;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue