jperelli / vue2-leaflet-markercluster

markercluster plugin extension for vue2-leaflet package
MIT License
132 stars 55 forks source link

Advanced example custom markercluster. #29

Open dolgovdv opened 5 years ago

dolgovdv commented 5 years ago

Hello @jperelli. This is not a issue report. I'm just starting to learn vue and js. Your plugin helps a lot. Please show an advanced example for changing the cluster marker color settings via refreshClusters ().

If necessary, I can bring the cog of my component with the map. Thank you.

jperelli commented 5 years ago

Hi, please provide your component code

dolgovdv commented 5 years ago

Hey. I want to access the cluster marker configuration features.

https://github.com/dolgovdv/vue-element-admin/blob/master/src/components/Map/map.vue

AlexisWalravens commented 5 years ago

Hey, any news on this ? I'm trying to change the clusters Icon but I did not find how to... Where and how should I place the iconCreateFunction option ? Thanks

donni106 commented 4 years ago

@AlexisWalravens iconCreateFunction should be part of the options for the marker cluster.

<l-marker-cluster :options="clusterOptions">

with clusterOptions in you data of the component:

data() {
  return {
    ...
    clusterOptions: {
      ...
      iconCreateFunction: () => {
        ...
      }
    }
    ...
  }
}

all possible options are documented here: https://github.com/Leaflet/Leaflet.markercluster#all-options