Added regions-compatiblity with old configuration.
This commit is contained in:
parent
1083329b52
commit
7c87539f46
1 changed files with 11 additions and 0 deletions
|
|
@ -2,6 +2,17 @@ var regionConstructors = {};
|
||||||
|
|
||||||
componentconstructors['regions'] = function(dynmap, configuration) {
|
componentconstructors['regions'] = function(dynmap, configuration) {
|
||||||
|
|
||||||
|
// Compatibility with older configurations.
|
||||||
|
if (configuration.regionstyle) {
|
||||||
|
configuration.regionstyle = $.extend({
|
||||||
|
stroke: true,
|
||||||
|
color: configuration.strokeColor,
|
||||||
|
opacity: configuration.strokeOpacity,
|
||||||
|
weight: configuration.strokeWeight,
|
||||||
|
fill: true
|
||||||
|
}, configuration.regionstyle);
|
||||||
|
}
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
latlng = function(x, y, z) {
|
latlng = function(x, y, z) {
|
||||||
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));
|
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue