Tag Info

New answers tagged

1

You should add the script that loads the markercluster plugin after you've loaded the core leaflet application. The markercluster functionality is based on extended/new classes from Leaflet, so it has to read Leaflet first. So, put this line: <script ...


0

A few options You could build your own server end-point that registers a new database record each time a marker is clicked, including whatever information you want to track You could use Google Analytics and jQuery and do something like: var marker = L.marker([51.5, -0.09]).addTo(map); marker.on('click', function() { // sends notification to your ...


0

Oh well I'll answer my own question - thanks to Joerg from elsewhere - it was just the case - for geoJson you use mixed case as in my JSFiddle example which worked: http://jsfiddle.net/megalithic/zuz4urb7/ But the CSV plugin lowers the case of all the variables - Aaaargh - but by no means obvious so I thought I should follow up with the working code - CSV ...


0

It can be done as it follows: var geocoder_control = L.mapbox.geocoderControl('mapbox.places', { keepOpen: false }); var map = L.mapbox.map('map', 'mapbox.streets').addControl(geocoder_control); geocoder_control.on('select', function(object){ var coord = object.feature.geometry.coordinates; L.mapbox.featureLayer({ type: 'Feature', ...


1

You need to create a separate icon style for each style you want to display. It helps to have them all in a reference cache so you don't create a separate style for each object (see the styles object in the code below. Then, when add a feature to a layer you attach a reference to the style in the cache that matches the feature type you're adding. ...



Top 50 recent answers are included