Fix weird clustering and change marker colors

This commit is contained in:
Arne Schlüter 2015-02-09 00:11:05 +01:00
commit c41f7b4cf8
3 changed files with 9 additions and 4 deletions

View file

@ -2,7 +2,7 @@
import Visualization from './visualization'
// http://www.colourlovers.com/palette/1811244/1001_Stories
var colors = [ '#F8B195', '#F67280', '#C06C84', '#6C5B7B', '#355C7D' ]
var colors = [ '#355C7D', '#F67280', '#C06C84', '#6C5B7B', '#888888' ]
// set up background map
var map = L.map('map').setView([52.50, 13.40], 11)

View file

@ -23,9 +23,14 @@ class Visualization {
// set up OMS
this.oms = new OverlappingMarkerSpiderfier(map, {
keepSpiderfied: true,
circleSpiralSwitchover: 12,
nearbyDistance: 1
})
this.oms.legColors = {
usual: 'rgba(0,0,0,.1)',
highlighted: 'rgba(0,0,0,.4)'
}
var popup = new L.Popup();
this.oms.addListener('click', function (marker) {
popup.setContent(marker.description.replace(/\n/g, '<br>'))