Apply LMarker on Geojson
See original GitHub issueHi,
I’m building a map with two geojson (loaded by axios) and i would like to apply differents markers for each geojson but i don’t find how to merge l-geo-json
, l-marker
and l-icon
Here’s my code example : https://jsfiddle.net/HamHamFonFon/p3Lsf6d1/9/
Default icon style is still applying and i don’t know how to fix it. Thanks for help 😃.
Versions
- Leaflet: v1.5.8 (not sure)
- Vue: v2.6.11
- Vue2Leaflet: v2.5.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Custom marker and properties from geoJSON in Leaflet
To create a custom marker you can create a L.Icon object and for the popup you can use the onEachFeature option.
Read more >How to add Markers on Map from geoJson with many points ...
Regardless, here is a working jsfiddle that visualizes your geojson as markers on a leaflet map. And here is the relevant code (with...
Read more >Add GeoJSON Location Data to a Map Using Markers and ...
In this lesson, you will learn how to add GeoJSON data to a map in React Leaflet. Using the National Parks in the...
Read more >Add markers to a web map with a symbol layer | Mapbox GL JS
Draw points from a GeoJSON collection to a map. ... Add markers to a web map with a symbol layer ... Add an...
Read more >Using GeoJSON with Leaflet
By default simple markers are drawn for GeoJSON Points. We can alter this by passing a pointToLayer function in a GeoJSON options object...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/HamHamFonFon/deep-space-objects/blob/master/assets/js/Widgets/Observation/List.vue#L65
<l-geo-json v-if="(itemselect === 'event') || (itemselect === 'all')" :geojson="geojsonEvents" :options="optionsEvents" name="l_events" >
Then : https://github.com/HamHamFonFon/deep-space-objects/blob/master/assets/js/Widgets/Observation/List.vue#L181
You’re welcome 😃