origo
origo copied to clipboard
Sharemap doesn't work when configuration is defined inline.
The sharemap control is able to save the mapstate, but the given link doesn't retrieve it. Works when config is stored in separate json file.
<html>
<head>
<link href='css/style.css' rel='stylesheet'>
<script src="js/origo.min.js"></script>
<script>
var json={
"controls": [
{
"name":"mapmenu",
"options":{
"isActive":true
}
},
{
"name":"sharemap",
"options":{
"title":"Dela karta",
"storeMethod": "saveStateToServer",
"serviceEndpoint": "../origoserver/mapstate"
}
}
],
"projectionCode": "EPSG:3857",
"extent": [
-20026376.39,
-20048966.1,
20026376.39,
20048966.1
],
"center": [
1770000,
8770000
],
"resolutions": [
1222.99
],
"layers": [{
"name": "osm",
"title": "OpenStreetMap",
"type": "OSM",
"visible": true
}]
};
</script>
</head>
<body>
<div id="app-wrapper"></div>
<script>
var origo = Origo(json);
</script>
</body>
</html>