Skip to content

Commit 34160f0

Browse files
committed
fixes
1 parent f9c1027 commit 34160f0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/sparqlunicorn_ontdoc/resources/html/default/js/startscripts.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,10 @@ function restyleLayer(propertyName,geojsonLayer) {
16311631
thecolor=getColor(layer.feature, propertyName, propertyValue, rangesByAttribute)
16321632
if( layer instanceof L.Marker ) {
16331633
layer.setIcon(L.divIcon({
1634-
iconSize: "auto",
1634+
className: "my-custom-pin",
1635+
iconAnchor: [0, 24],
1636+
labelAnchor: [-6, 0],
1637+
popupAnchor: [0, -36],
16351638
html: "<span id=\"feature\" style=\"background-color: "+thecolor+";width: 3rem;height: 3rem;display: block;left: -1.5rem;top: -1.5rem;position: relative;border-radius: 3rem 3rem 0;transform: rotate(45deg);border: 1px solid #FFFFFF`\"></span>"
16361639
}))
16371640
}
@@ -1931,7 +1934,10 @@ function setupLeaflet(baselayers,epsg,baseMaps,overlayMaps,map,featurecolls,date
19311934
layerr=L.geoJSON.css(feature,{
19321935
pointToLayer: function(feature, latlng){
19331936
greenIcon=L.divIcon({
1934-
iconSize: "auto",
1937+
className: "my-custom-pin",
1938+
iconAnchor: [0, 24],
1939+
labelAnchor: [-6, 0],
1940+
popupAnchor: [0, -36],
19351941
html: "<span id=\"feature\" style=\"background-color: black;width: 3rem;height: 3rem;display: block;left: -1.5rem;top: -1.5rem;position: relative;border-radius: 3rem 3rem 0;transform: rotate(45deg);border: 1px solid #FFFFFF`\"></span>"
19361942
})
19371943
/* var greenIcon = new L.Icon({

0 commit comments

Comments
 (0)