added fixed center option
added option to fix the map on a specific coordinate
This commit is contained in:
parent
11a157c58a
commit
8d22417789
2 changed files with 20 additions and 1 deletions
|
@ -447,7 +447,10 @@ define(["map/clientlayer", "map/labelslayer",
|
|||
var lines = addLinksToMap(linkDict, linkScale, data.graph.links, router)
|
||||
groupLines = L.featureGroup(lines).addTo(map)
|
||||
|
||||
barycenter = calcBarycenter(data.nodes.all.filter(has_location))
|
||||
if (typeof config.fixedCenter === "undefined")
|
||||
barycenter = calcBarycenter(data.nodes.all.filter(has_location))
|
||||
else
|
||||
barycenter = L.circle(L.latLng(new L.LatLng(config.fixedCenter.lat, config.fixedCenter.lng)), config.fixedCenter.radius * 1000)
|
||||
|
||||
var nodesOnline = subtract(data.nodes.all.filter(online), data.nodes.new)
|
||||
var nodesOffline = subtract(data.nodes.all.filter(offline), data.nodes.lost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue