Saturday 18 January 2020

leaflet - Which are the Geojson css style properties for mapbox.js?



I try to style a LineString in a Mapbox Map through L.Geojson and all the style properties I could find are: fillColor, colour, weight, opacity. Does anyone know if there is something else? For example to add a border width, a colour to this border, dashed the line, etc. ?



Answer




  • title

  • description

  • marker-size

  • marker-symbol

  • marker-color

  • stroke

  • stroke-opacity


  • stroke-width

  • fill

  • fill-opacity


Mapbox.js uses the simplestyle spec. That's where you can find out more about defaults and accepted values.


Adding a dashed line is a little more complicated, see dashArray in the leaflet documentation which will work with mapbox.js.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...