Styled Line

Interactive map data

center: -68.137,45.137
zoom: 5
pitch: 0
bearing: 0
minZoom: 0
maxZoom: 22
bounds: undefined
svelte
<MapLibre
  style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
  class={mapClasses}
  standardControls
  center={[-68.137, 45.137]}
  zoom={5}
>
  <GeoJSON id="maine" {data}>
    <LineLayer
      layout={{ 'line-cap': 'round', 'line-join': 'round' }}
      paint={{
        'line-width': 5,
        'line-dasharray': [5, 2],
        'line-color': '#008800',
        'line-opacity': 0.8,
      }}
    />
  </GeoJSON>
</MapLibre>

Back to Examples

Github