question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apply LMarker on Geojson

See original GitHub issue

Hi, 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
HamHamFonFoncommented, Mar 17, 2020

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

0reactions
HamHamFonFoncommented, Mar 18, 2020

Thx, it really works for me

You’re welcome 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found