WMS публичной кадастровой карты в GeoExt

Mapserver, GeoServer, MapGuide, Google и другое ПО для веб-картографии
Ответить
Аватара пользователя
Филиппов Владислав
Гуру
Сообщения: 1035
Зарегистрирован: 17 фев 2006, 06:28
Репутация: 144
Ваше звание: Геннадич
Откуда: Новосибирск
Контактная информация:

WMS публичной кадастровой карты в GeoExt

Сообщение Филиппов Владислав »

Не получается добавить WMS публичной кадастровой карты в GeoExt

вот валидный URL - http://maps.rosreestr.ru/ArcGIS/service ... /WMSServer, где и версия сервиса есть и Name и Title слоёв и ещё куча всего

Код: Выделить всё

 /**
 * Add all your dependencies here.
 *
 * @require widgets/Viewer.js
 * @require plugins/LayerTree.js
 * @require plugins/OLSource.js
 * @require plugins/OSMSource.js
 * @require plugins/WMSCSource.js
 * @require plugins/WMSSource.js
 * @require plugins/BingSource.js
 * @require plugins/GoogleSource.js  
 * @require plugins/ZoomToExtent.js
 * @require plugins/NavigationHistory.js
 * @require plugins/Zoom.js
 * @require plugins/AddLayers.js
 * @require plugins/RemoveLayer.js
 * @require RowExpander.js
 * @require plugins/WMSGetFeatureInfo.js
 * @require plugins/FeatureManager.js
 * @require plugins/FeatureEditor.js
 * @require plugins/FeatureGrid.js
 * @require plugins/DrawBox.js
 * @require plugins/BoxInfo.js
 */

var app = new gxp.Viewer({
    portalConfig: {
        layout: "border",
        region: "center",
        
        // by configuring items here, we don't need to configure portalItems
        // and save a wrapping container
        items: [{
            id: "centerpanel",
            xtype: "panel",
            layout: "fit",
            region: "center",
            border: false,
            items: ["mymap"]
        }, {
            id: "westpanel",
            xtype: "container",
            layout: "fit",
            region: "west",
            width: 200
        },{
			id: "south",
			xtype: "container",
			layout: "fit",
			region: "south",
			border: false,
			height: 200
		}, {
            id: "southpanel",
            xtype: "container",
            layout: "fit",
            region: "south",
            height: 100
        }
		],
        bbar: {id: "mybbar"}
    },
    
    // configuration of all tool plugins for this application
    tools: [{
        ptype: "gxp_layertree",
        outputConfig: {
            id: "tree",
            border: true,
            tbar: [] // we will add buttons to "tree.bbar" later
        },
        outputTarget: "westpanel"
    }, {
        ptype: "gxp_addlayers",
        actionTarget: "tree.tbar"
    }, {
        ptype: "gxp_removelayer",
        actionTarget: ["tree.tbar", "tree.contextMenu"]
    }, {
        ptype: "gxp_zoomtoextent",
        actionTarget: "map.tbar"
    }, {
        ptype: "gxp_zoom",
        actionTarget: "map.tbar"
    }, {
        ptype: "gxp_navigationhistory",
        actionTarget: "map.tbar"
    }, {
		ptype: "gxp_wmsgetfeatureinfo",
		featureManager: "states_manager",
		outputConfig: {
			width: 700
		},
		actionTarget: {
			target: "map.tbar",
			index: 1
		}
	}, {
		ptype: "gxp_featuremanager",
		id: "states_manager",
		paging: false,
		autoLoadFeatures: true,
		layer: {
			source: "local",
			name: "geo:fence"
		}
	}, {
		ptype: "gxp_featureeditor",
		featureManager: "states_manager",
		autoLoadFeature: true
	}, /*{
		ptype: "gxp_featuregrid",
		featureManager: "states_manager",
		outputConfig: {
			loadMask: true
		},
		outputTarget: "south"
	},*/ {
        ptype: "myapp_drawbox",
		id: "drawbox",
        actionTarget: "map.tbar"
    }, {
        ptype: "myapp_boxinfo",
		boxTool: "drawbox",
        outputTarget: "southpanel"
    }
	],
    
    // layer sources
    sources: {
        local: {
            ptype: "gxp_wmscsource",
            url: "/geoserver/wms",
            version: "1.1.1"
        },
        osm: {
            ptype: "gxp_osmsource"
        },
		rosreestr: {
            ptype: "gxp_wmssource",
            url: "http://maps.rosreestr.ru/arcgis/services/CadastreNew/CadastreWMS/MapServer/WMSServer?service=WMS"
			//version: "1.3.0"
			//,srs: "EPSG:3857"
        },
		"bing": {
			ptype: "gxp_bingsource"
		},
		"google": {
			ptype: "gxp_googlesource"
		}
    },
    
    // map and layers
    map: {
        id: "mymap", // id needed to reference map in portalConfig above
        title: "Map",
        projection: "EPSG:3857",
        center: [4187314.9432233, 7447312.6747233],
        zoom: 17,
        layers: [{
            source: "osm",
            name: "mapnik",
            group: "background"
		}, {
            source: "bing",
            name: "Aerial",
			title: "Bing Map",
            group: "background"
		}, { 
            source: "google",
            name: "SATELLITE",
            group: "background"
		}, { 
			source: "rosreestr",
            name: "22,21,20,19,18,16,15,14,13,11,10,9,7,6,4,3,2,1",
            group: "background"	
        }, {
            source: "local",
            name: "geo:roadcover",
            selected: true,
			visibility: true
		}, {
            source: "local",
            name: "geo:bridge_polygon",
			visibility: true	
        }, {
            source: "local",
            name: "geo:cadastre_s",
			visibility: true
		}, {
            source: "local",
            name: "geo:fence",
			visibility: false
        }, {
            source: "local",
            name: "geo:curbs",
			visibility: false
        }, {
            source: "local",
            name: "geo:layout_polygon",
			visibility: false
		}, {
            source: "local",
            name: "geo:RoadInternodalSegment",
			visibility: true
        }
		],
        items: [{
            xtype: "gx_zoomslider",
            vertical: true,
            height: 100
        }]
    }

});
но в FireBug я вижу вот что:
Non-existing source 'rosreestr' referenced in layer config.
Снимок.png
Снимок.png (95.88 КБ) 4832 просмотра
Такой же результат на домашней машине (Ubuntu). Используется последняя версия OpenGeo Suite 3.0.2
что я не то делаю?
Аватара пользователя
Филиппов Владислав
Гуру
Сообщения: 1035
Зарегистрирован: 17 фев 2006, 06:28
Репутация: 144
Ваше звание: Геннадич
Откуда: Новосибирск
Контактная информация:

Re: WMS публичной кадастровой карты в GeoExt

Сообщение Филиппов Владислав »

решено.
нужно такие ресурсы подключать через OLSource.js, а не WMSSource.js
Ответить

Вернуться в «Веб-картография»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 1 гость