{"id":17218472,"url":"https://github.com/perliedman/leaflet-multi-style","last_synced_at":"2025-04-13T23:36:26.444Z","repository":{"id":50747379,"uuid":"91307890","full_name":"perliedman/leaflet-multi-style","owner":"perliedman","description":"Quickly add multiple styles to GeoJSON data","archived":false,"fork":false,"pushed_at":"2017-06-14T23:15:31.000Z","size":7,"stargazers_count":8,"open_issues_count":4,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T13:46:14.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perliedman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-15T07:29:35.000Z","updated_at":"2023-08-01T06:31:38.000Z","dependencies_parsed_at":"2022-09-24T19:03:59.830Z","dependency_job_id":null,"html_url":"https://github.com/perliedman/leaflet-multi-style","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Fleaflet-multi-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Fleaflet-multi-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Fleaflet-multi-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Fleaflet-multi-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perliedman","download_url":"https://codeload.github.com/perliedman/leaflet-multi-style/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248798973,"owners_count":21163396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T03:46:54.802Z","updated_at":"2025-04-13T23:36:26.401Z","avatar_url":"https://github.com/perliedman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Leaflet Multi Style\n===================\n\nA plugin to quickly add multiple styles to the same GeoJSON data. [Demo](http://www.liedman.net/leaflet-multi-style).\n\n## Using\n\nAs an extra option, you can add an array of `styles` instead of just a single `style`.\n\n```js\nvar vectorLayer = L.geoJson.multiStyle(geojson, {\n    styles: [\n        {color: 'black', opacity: 0.15, weight: 10},\n        {color: 'white', opacity: 0.8, weight: 8},\n        {color: 'red', opacity: 1, weight: 4}\n    ],\n}).addTo(map);\n```\n\nFor point features, the array `pointToLayers` replaces `pointToLayer`:\n\n```js\nvar vectorLayer = L.geoJson.multiStyle(geojson, {\n    pointToLayers: [\n        function (feature, latlng) {\n            return L.circleMarker(latlng, {\n                radius: 8.0,\n                fillColor: 'yellow'\n            })\n        },\n        function (feature, latlng) {\n            return L.circleMarker(latlng, {\n                radius: 4.0,\n                fillColor: 'red'\n            })\n        }\n    ]\n}).addTo(map);\n```\n\n\nSimilarily, there is also an option `filters` that works just like the original option `filter`, but is called for\neach style in `styles`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperliedman%2Fleaflet-multi-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperliedman%2Fleaflet-multi-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperliedman%2Fleaflet-multi-style/lists"}