I'm using HERON with google maps,everything seems to be fine except for the getFeatureInformation.I'm not really sure what the problem is as I'm still a beginner. I don't know if it's the layer sequence or the proxy setup or something else because during the process of my research I saw a couple of people mentioning those to be the problem at times.Attached is my code, Thanks!
Ext.namespace("Heron");OpenLayers.ProxyHost = "http://localhost:8080/cgi-bin/proxy.cgi";
Heron.layout = { xtype: 'panel', id: 'hr-container-main', layout: 'border',
items: [ { xtype: 'panel', id: 'hr-menu-left-container', layout: 'accordion', region : "west", width: 240, collapsible: true, split : true, border: false, items: [ { xtype: 'hr_layertreepanel', contextMenu: [ { xtype: 'hr_layernodemenulayerinfo' }, { xtype: 'hr_layernodemenuzoomextent' }, { xtype: 'hr_layernodemenuopacityslider' } ] } ] }, { xtype: 'panel', id: 'hr-map-and-info-container', layout: 'border', region: 'center', width: '100%', collapsible: true, split : true, border: false, items: [ { xtype: 'hr_mappanel', id: 'hr-map', region: 'center', collapsible : false, border: false, hropts: { settings : { //projection: 'EPSG:900913', projection: 'EPSG:4326', displayProjection: new OpenLayers.Projection("EPSG:4326"), units: 'm', //units: 'dd', maxExtent: new OpenLayers.Bounds(1247348.5486233, -4263307.2348958, 4260801.9513187, -2448386.4355452), center: new OpenLayers.LonLat(3094067.15174,-2937583.41650).transform( ([3094067.15174,-2937583.41650], 'EPSG:4326', 'EPSG:3857')), maxResolution: 'auto', xy_precision: 5, zoom: 12, theme: null }, layers : [ /* * Basemap OpenStreetMap */ new OpenLayers.Layer.OSM(), new OpenLayers.Layer.WMS( "World Cities (OpenGeo)", 'http://suite.opengeo.org/geoserver/ows?', {layers: "cities", transparent: true, format: 'image/png'}, {singleTile: true, opacity: 0.9, isBaseLayer: false, visibility: true, noLegend: false, featureInfoFormat: 'application/vnd.ogc.gml', transitionEffect: 'resize' } ), new OpenLayers.Layer.WMS( "South Africa", "http://gis.lib.virginia.edu:8080/geoserver/South_Africa/wms", { layers: 'South_Africa
onet_polygon', transparent: true }, { displayOutsideMaxExtent: true, singleTile: true, opacity: 0.9, isBaseLayer: false, visibility: true, noLegend: false, featureInfoFormat: "application/vnd.ogc.gml" }), new OpenLayers.Layer.WMS( "Outer layer", "http://gis.lib.virginia.edu:8080/geoserver/South_Africa/wms", { layers: 'South_Africa
opoint_point', transparent: true }, { singleTile: true, opacity: 0.9, isBaseLayer: false, visibility: true, noLegend: false, featureInfoFormat: "application/vnd.ogc.gml" }), new OpenLayers.Layer.WMS("Madibeng Road Network", "http://localhost:8080/geoserver/cite/wms", { layers: "Madibeng_LM_RoadNetwork0", transparent: true, format: "image/gif" }, { buffer: 0, featureInfoFormat: 'application/vnd.ogc.gml' }), new OpenLayers.Layer.WMS("Dihlabeng Place Names", "http://localhost:8080/geoserver/cite/wms", { layers: "Dihlabeng_Place_Names", transparent: true, format: "image/gif" }, { buffer: 0, featureInfoFormat: 'application/vnd.ogc.gml' }), // google layers dropped download new OpenLayers.Layer.Google( "Google Satellite", {type: google.maps.MapTypeId.SATELLITE, visibility: true}, {singleTile: false, buffer: 0, isBaseLayer: false} ), new OpenLayers.Layer.Google( "Google Streets", // the default {type: google.maps.MapTypeId.ROADMAP, visibility: false}, {singleTile: false, buffer: 0, isBaseLayer: false} ), new OpenLayers.Layer.Google( "Google Terrain", {type: google.maps.MapTypeId.TERRAIN, visibility: false}, {singleTile: false, buffer: 0, isBaseLayer: false} ), //end of google ], toolbar: [ {type: "featureinfo", options: { pressed: true, getfeatureControl:{ hover:true, drillDown:false, maxFeatuures:1 }, popupWindow: { width: 360, height: 200, featureInfoPanel: { showTopToolbar: true, //displayPanels: ['Table'], displayPanels: ['Grid'], // Should column-names be capitalized? Default true. columnCapitalize: true, // Export to download file. Option values are 'CSV', 'XLS', default is no export (results in no export menu). exportFormats: ['CSV', 'XLS', 'GMLv2', 'Shapefile', 'GeoJSON', 'WellKnownText'], // Export to download file. Option values are 'CSV', 'XLS', default is no export (results in no export menu). // exportFormats: ['CSV', 'XLS'], maxFeatures: 10 } } }}, {type: "-"} , {type: "pan"}, {type: "zoomin"}, {type: "zoomout"}, {type: "zoomvisible"}, {type: "-"} , {type: "zoomprevious"}, {type: "zoomnext"}, {type: "-"}, {type: "measurelength", options: {geodesic: true}}, {type: "measurearea", options: {geodesic: true}} ] } } ] }]};
أكثر...
Ext.namespace("Heron");OpenLayers.ProxyHost = "http://localhost:8080/cgi-bin/proxy.cgi";
Heron.layout = { xtype: 'panel', id: 'hr-container-main', layout: 'border',
items: [ { xtype: 'panel', id: 'hr-menu-left-container', layout: 'accordion', region : "west", width: 240, collapsible: true, split : true, border: false, items: [ { xtype: 'hr_layertreepanel', contextMenu: [ { xtype: 'hr_layernodemenulayerinfo' }, { xtype: 'hr_layernodemenuzoomextent' }, { xtype: 'hr_layernodemenuopacityslider' } ] } ] }, { xtype: 'panel', id: 'hr-map-and-info-container', layout: 'border', region: 'center', width: '100%', collapsible: true, split : true, border: false, items: [ { xtype: 'hr_mappanel', id: 'hr-map', region: 'center', collapsible : false, border: false, hropts: { settings : { //projection: 'EPSG:900913', projection: 'EPSG:4326', displayProjection: new OpenLayers.Projection("EPSG:4326"), units: 'm', //units: 'dd', maxExtent: new OpenLayers.Bounds(1247348.5486233, -4263307.2348958, 4260801.9513187, -2448386.4355452), center: new OpenLayers.LonLat(3094067.15174,-2937583.41650).transform( ([3094067.15174,-2937583.41650], 'EPSG:4326', 'EPSG:3857')), maxResolution: 'auto', xy_precision: 5, zoom: 12, theme: null }, layers : [ /* * Basemap OpenStreetMap */ new OpenLayers.Layer.OSM(), new OpenLayers.Layer.WMS( "World Cities (OpenGeo)", 'http://suite.opengeo.org/geoserver/ows?', {layers: "cities", transparent: true, format: 'image/png'}, {singleTile: true, opacity: 0.9, isBaseLayer: false, visibility: true, noLegend: false, featureInfoFormat: 'application/vnd.ogc.gml', transitionEffect: 'resize' } ), new OpenLayers.Layer.WMS( "South Africa", "http://gis.lib.virginia.edu:8080/geoserver/South_Africa/wms", { layers: 'South_Africa
أكثر...