Add source layer support

This commit is contained in:
lukasmartinelli
2016-09-10 22:08:26 +02:00
parent 95ae8892f4
commit 890169751b
6 changed files with 150 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ function fromJSON(jsonStyle) {
if(key === "layers") {
return [key, Immutable.OrderedMap(val.map(l => [l.id, Immutable.fromJS(l)]))]
} else if(key === "sources" || key === "metadata" || key === "transition") {
return [key, Immutable.Map(val)]
return [key, Immutable.fromJS(val)]
} else {
return [key, val]
}