Skip to content

Releases: watergis/mapbox-gl-legend

v1.2.6

08 Jun 16:25
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.5...v1.2.6

v1.2.5

19 Nov 16:57
Compare
Choose a tag to compare
  • updated legend-symbol. Now linedasharray is supported

Full Changelog: v1.2.4...v1.2.5

v1.2.4

12 Aug 17:51
Compare
Choose a tag to compare
  • updated NPM packages
  • removed namespace from CDN
  • #23

v1.2.3

18 Apr 19:54
Compare
Choose a tag to compare

fixed a bug of creating legend symbol

v1.2.2

29 Mar 21:00
Compare
Choose a tag to compare
  • fixed a bug with raster layer (#22)

v1.2.1

19 Nov 20:21
Compare
Choose a tag to compare
1.2.1

v1.2.0

17 Oct 08:11
Compare
Choose a tag to compare
  • Now scripts and css can be loaded directly in your html file through CDN
  • Due to supporting CDN format, Importing method was changed as follows
-import MapboxLegendControl from "@watergis/mapbox-gl-legend";
+import { MapboxLegendControl } from "@watergis/mapbox-gl-legend";
  • For CDN, you can use scripts as follows
<link href='https://watergis.github.io/mapbox-gl-legend/mapbox-gl-legend.css' rel='stylesheet' />
<script src="https://watergis.github.io/mapbox-gl-legend/mapbox-gl-legend.js"></script>

<script>
map.on('load', function() {
    const targets = {
        'pipeline': 'Pipeline',
        'pipeline_annotation': 'Pipeline Label', 
        'meter': 'Water Meter',
        'flow meter': 'Flow Meter', 
        'valve': 'Valve', 
        'firehydrant': 'Fire Hydrant', 
        'washout': 'Washout',
        'tank': 'Tank', 
        'tank_annotation': 'Tank Label', 
        'wtp': 'WTP', 
        'wtp_annotation': 'WTP Label', 
        'intake': 'Intake', 
        'intake_annotation': 'Intake Label', 
        'parcels': 'Parcels', 
        'parcels_annotation': 'Parcels Label', 
        'village': 'Village', 
        'village_annotation': 'Village Label', 
        'dma': 'DMA',
        'dma-annotation': 'DMA Label', 
        'contour-line': 'Countour',
        'contour-label': 'Contour Label',
        'hillshade': 'Hillshade'
    };
    map.addControl(new watergis.MapboxLegendControl(targets, {
        showDefault: false, 
        showCheckbox: false, 
        onlyRendered: true,
        reverseOrder: true
    }), 'top-right');
})
</script>

v1.1.7

03 Sep 13:32
Compare
Choose a tag to compare
  • fixed a bug on Firefox (#14)

v1.1.6

24 Jul 07:30
Compare
Choose a tag to compare
  • added accesstoken option (#12)
  • updated legend-symbol to the latest (now it started to use @watergis/legend-symbol)

v1.1.5

06 May 21:44
Compare
Choose a tag to compare