Skip to content

Instantly share code, notes, and snippets.

@mpriour
Created November 17, 2011 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpriour/1374684 to your computer and use it in GitHub Desktop.
Save mpriour/1374684 to your computer and use it in GitHub Desktop.
Saved map config vs Retrieved map config
SENT JSON
{
"tools": [
...
],
"proxy": "/proxy/?url=",
"rest": "/maps/",
"sources": {
"0": {
"ptype": "gx_olsource",
"projection": "EPSG:900913",
"id": "0"
},
"local": {
"url": "/geoserver/wms",
"restUrl": "/gs/rest",
"ptype": "gxp_wmscsource",
"projection": "EPSG:900913",
"id": "local",
"baseParams": {
"SERVICE": "WMS",
"REQUEST": "GetCapabilities",
"TILED": true,
"VERSION": "1.1.1"
},
"format": {
"keepData": true,
"profile": "WMSC",
"options": {
"keepData": true,
"profile": "WMSC"
},
"namespaces": {},
"namespaceAlias": {},
"name": "WMSCapabilities",
"parser": {
"keepData": true,
"profile": "WMSC",
"options": {
"keepData": true,
"profile": "WMSC"
},
"namespaces": {
"wms": "http://www.opengis.net/wms",
"xlink": "http://www.w3.org/1999/xlink",
"xsi": "http://www.w3.org/2001/XMLSchema-instance"
},
"namespaceAlias": {
"http://www.opengis.net/wms": "wms",
"http://www.w3.org/1999/xlink": "xlink",
"http://www.w3.org/2001/XMLSchema-instance": "xsi"
}
}
}
}
},
"about": {
"abstract": "",
"title": "test2"
},
"localGeoServerBaseUrl": "http://192.168.0.9:8080/geoserver/",
"map": {
"layers": [
{
"source": "0",
"name": "OpenStreetMap",
"title": "OpenStreetMap",
"visibility": true,
"opacity": 1,
"group": "background",
"fixed": true,
"selected": false,
"type": "OpenLayers.Layer.OSM",
"args": [
"OpenStreetMap"
]
},
{
"source": "0",
"name": "No background",
"title": "No background",
"visibility": false,
"opacity": 1,
"group": "background",
"fixed": true,
"selected": false,
"type": "OpenLayers.Layer",
"args": [
"No background"
]
},
{
"source": "0",
"name": "bluemarble",
"title": "bluemarble",
"visibility": false,
"opacity": 1,
"group": "background",
"fixed": true,
"selected": true,
"type": "OpenLayers.Layer.WMS",
"args": [
"bluemarble",
"http://maps.opengeo.org/geowebcache/service/wms",
{
"layers": [
"bluemarble"
],
"tiled": true,
"tilesOrigin": [
-20037508.34,
-20037508.34
],
"format": "image/png"
},
{
"buffer": 0
}
]
},
{
"source": "local",
"name": "geonode:exams",
"title": "exams",
"visibility": true,
"opacity": 1,
"selected": false,
"format": "image/png",
"styles": "",
"transparent": true,
"cached": true
}
],
"projection": "EPSG:900913",
"numZoomLevels": 22,
"zoom": 4,
"units": "m",
"maxResolution": 156543.03390625,
"maxExtent": [
-20037508.34,
-20037508.34,
20037508.34,
20037508.34
],
"center": [
12532348.271762,
3521082.242398
]
},
"defaultSourceType": "gxp_wmscsource",
"apiKeys": {
"google": "ABQIAAAAkofooZxTfcCv9Wi3zzGTVxTnme5EwnLVtEDGnh-lFVzRJhbdQhQgAhB1eT_2muZtc0dl-ZSWrtzmrw"
},
"authorizedRoles": [
"ROLE_ADMINISTRATOR"
],
"id": null
}
RECEIVED JSON
{
"tools": [
...
],
"proxy": "/proxy/?url=",
"rest": "/maps/",
"sources": {
"0": {
"id": "0",
"ptype": "gx_olsource"
},
"1": {
"format": {
"profile": "WMSC",
"name": "WMSCapabilities",
"parser": {
"profile": "WMSC",
"keepData": true,
"options": {
"profile": "WMSC",
"keepData": true
},
"namespaces": {
"wms": "http://www.opengis.net/wms",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"xlink": "http://www.w3.org/1999/xlink"
},
"namespaceAlias": {
"http://www.opengis.net/wms": "wms",
"http://www.w3.org/1999/xlink": "xlink",
"http://www.w3.org/2001/XMLSchema-instance": "xsi"
}
},
"namespaceAlias": {},
"keepData": true,
"namespaces": {},
"options": {
"profile": "WMSC",
"keepData": true
}
},
"url": "/geoserver/wms",
"baseParams": {
"VERSION": "1.1.1",
"REQUEST": "GetCapabilities",
"TILED": true,
"SERVICE": "WMS"
},
"ptype": "gxp_wmscsource",
"restUrl": "/gs/rest",
"id": "local"
},
"local": {
"url": "/geoserver/wms",
"restUrl": "/gs/rest",
"ptype": "gxp_wmscsource"
}
},
"about": {
"abstract": "",
"title": "test"
},
"localGeoServerBaseUrl": "http://192.168.0.9:8080/geoserver/",
"map": {
"layers": [
{
"opacity": 1,
"args": [
"OpenStreetMap"
],
"group": "background",
"name": "OpenStreetMap",
"selected": false,
"visibility": true,
"source": "0",
"fixed": true,
"type": "OpenLayers.Layer.OSM"
},
{
"opacity": 1,
"args": [
"No background"
],
"group": "background",
"name": "No background",
"selected": false,
"visibility": false,
"source": "0",
"fixed": true,
"type": "OpenLayers.Layer"
},
{
"opacity": 1,
"args": [
"bluemarble",
"http://maps.opengeo.org/geowebcache/service/wms",
{
"layers": [
"bluemarble"
],
"tiled": true,
"tilesOrigin": [
-20037508.34,
-20037508.34
],
"format": "image/png"
},
{
"buffer": 0
}
],
"group": "background",
"name": "bluemarble",
"selected": true,
"visibility": false,
"source": "0",
"fixed": true,
"type": "OpenLayers.Layer.WMS"
},
{
"opacity": 1,
"name": "geonode:exams",
"format": "image/png",
"cached": true,
"selected": true,
"visibility": true,
"source": "1",
"fixed": false,
"transparent": true
}
],
"projection": "EPSG:900913",
"numZoomLevels": 22,
"zoom": 4,
"units": "m",
"maxResolution": 156543.03390625,
"maxExtent": [
-20037508.34,
-20037508.34,
20037508.34,
20037508.34
],
"center": [
12532348.2718,
3521082.2424
]
},
"defaultSourceType": "gxp_wmscsource",
"apiKeys": {
"google": "ABQIAAAAkofooZxTfcCv9Wi3zzGTVxTnme5EwnLVtEDGnh-lFVzRJhbdQhQgAhB1eT_2muZtc0dl-ZSWrtzmrw"
},
"authorizedRoles": [
"ROLE_ADMINISTRATOR"
],
"id": 15
}
Main difference is the local source versus the source "1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment