OpenLayers.ProxyHost = "http://dev.openlayers.org/releases/OpenLayers-2.8/examples/proxy.cgi?url="; OpenLayers.ProxyHost = "http://dev.openlayers.org/releases/OpenLayers-2.8/examples/proxy.cgi?url=";
// prevent pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; OpenLayers.Util.onImageLoadErrorColor = "transparent";
// reference local blank image Ext.BLANK_IMAGE_URL = 'http://mapdata.thehumanjourney.net/mapfish/client/mfbase/ext/resources/images/default/s.gif';
var layer, map, searchprotocol, p, mapnik //define variables here so they can be used globally
// define OSGB for proj4js Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs";
//prevent wfs from falling over OpenLayers.ProxyHost = "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/pf/wms/cgi-bin/proxy.cgi?url=";
function createMap() { var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", numZoomLevels: 19, maxResolution: 156543.0339, controls: [], maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34) }; return new OpenLayers.Map('map',options); } //end createmap
function addlayers(map){
// define wms layer = new OpenLayers.Layer.WMS( "Bedrijventerreinen", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/pf/wms", {layers: 'pf:pf_bedter_ao', transparent: true, format: 'image/png', buffer:0},
{visibility: false});
// define wms layer2 = new OpenLayers.Layer.WMS("Bedrijventerrein-percelen", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/pf/wms", {layers: 'pf:pf_bedter_perc_ao', transparent: true, format: 'image/png', buffer:0},{visibility: false});
// setup tiled layer kmirood_tiled = new OpenLayers.Layer.WMS( "KMI rood", "http://kratos0.ugent.be:8080/geoserver/KMI/wms", { LAYERS: 'KMI:KMI_rood', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer kmioranje_tiled = new OpenLayers.Layer.WMS( "KMI oranje", "http://kratos0.ugent.be:8080/geoserver/KMI/wms", { LAYERS: 'KMI:KMI_oranje', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer bufwind_tiled = new OpenLayers.Layer.WMS( "Buffer rond grote windturbine", "http://kratos0.ugent.be:8080/geoserver/Windturbine/wms", { LAYERS: 'Windturbine:Buffer_windturbines', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer deforan_tiled = new OpenLayers.Layer.WMS( "Defensie oranje", "http://kratos0.ugent.be:8080/geoserver/Defensie/wms", { LAYERS: 'Defensie:Defensie_heel_gelimiteerde_mogelijkheid_windturbine', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer defrood_tiled = new OpenLayers.Layer.WMS( "Defensie rood", "http://kratos0.ugent.be:8080/geoserver/Defensie/wms", { LAYERS: 'Defensie:Defensie_geen_mogelijkheid_windturbine', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer defo_tiled = new OpenLayers.Layer.WMS( "Belgocontrol oranje", "http://kratos0.ugent.be:8080/geoserver/Defensie/wms", { LAYERS: 'Defensie:Defensie oranje', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer defr_tiled = new OpenLayers.Layer.WMS( "Belgocontrol rood", "http://kratos0.ugent.be:8080/geoserver/Defensie/wms", { LAYERS: 'Defensie:Defensie rode zone', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer waterkl_tiled = new OpenLayers.Layer.WMS( "Waterweg kleinewind 10kW", "http://kratos0.ugent.be:8080/geoserver/Waterweg/wms", { LAYERS: 'Waterweg:Kleinewind waterweg', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer water1_tiled = new OpenLayers.Layer.WMS( "Waterweg middelwind 50kW", "http://kratos0.ugent.be:8080/geoserver/Waterweg/wms", { LAYERS: 'Waterweg:middelwind1 waterweg', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } ); // setup tiled layer water2_tiled = new OpenLayers.Layer.WMS( "Waterweg middelwind 100kW", "http://kratos0.ugent.be:8080/geoserver/Waterweg/wms", { LAYERS: 'Waterweg:middelwind2 waterweg', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer water3_tiled = new OpenLayers.Layer.WMS( "Waterweg middelwind 200kW", "http://kratos0.ugent.be:8080/geoserver/Waterweg/wms", { LAYERS: 'Waterweg:middelwind3 waterweg', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer hoogspankl_tiled = new OpenLayers.Layer.WMS( "Hoogspanning kleinewind 10kW", "http://kratos0.ugent.be:8080/geoserver/Hoogspanning/wms", { LAYERS: 'Hoogspanning:Kleine wind Hoogsp', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer hoogspanmid1_tiled = new OpenLayers.Layer.WMS( "Hoogspanning middelwind 50kW", "http://kratos0.ugent.be:8080/geoserver/Hoogspanning/wms", { LAYERS: 'Hoogspanning:Middel wind2 Hoogsp', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer hoogspanmid2_tiled = new OpenLayers.Layer.WMS( "Hoogspanning middelwind 100kW", "http://kratos0.ugent.be:8080/geoserver/Hoogspanning/wms", { LAYERS: 'Hoogspanning:Middel wind3 Hoogsp', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer hoogspanmid3_tiled = new OpenLayers.Layer.WMS( "Hoogspanning middelwind 200kW", "http://kratos0.ugent.be:8080/geoserver/Hoogspanning/wms", { LAYERS: 'Hoogspanning:Middel wind1 Hoogsp', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer spoor1_tiled = new OpenLayers.Layer.WMS( "Spoorweg middelwind 50kW", "http://kratos0.ugent.be:8080/geoserver/Spoorweg/wms", { LAYERS: 'Spoorweg:Spoorweg middel1', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer spoor2_tiled = new OpenLayers.Layer.WMS( "Spoorweg middelwind 100kW", "http://kratos0.ugent.be:8080/geoserver/Spoorweg/wms", { LAYERS: 'Spoorweg:Spoorweg middel2', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
spoor3_tiled = new OpenLayers.Layer.WMS( "Spoorweg middelwind 200kW", "http://kratos0.ugent.be:8080/geoserver/Spoorweg/wms", { LAYERS: 'Spoorweg:Spoorweg middel3', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
spoorkl_tiled = new OpenLayers.Layer.WMS( "Spoorweg kleine wind 10kW", "http://kratos0.ugent.be:8080/geoserver/Spoorweg/wms", { LAYERS: 'Spoorweg:Kleinewind Spoor', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer wind15_tiled = new OpenLayers.Layer.WMS( "Windkaart 15m", "http://kratos0.ugent.be:8080/geoserver/Windsnelheid/wms", { LAYERS: 'Windsnelheid:Windsnelheid 15m', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer wind20_tiled = new OpenLayers.Layer.WMS( "Windkaart 20m", "http://kratos0.ugent.be:8080/geoserver/Windsnelheid/wms", { LAYERS: 'Windsnelheid:Windsnelheid 20m', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer wind30_tiled = new OpenLayers.Layer.WMS( "Windkaart 30m", "http://kratos0.ugent.be:8080/geoserver/Windsnelheid/wms", { LAYERS: 'Windsnelheid:Windsnelheid 30m', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer wind40_tiled = new OpenLayers.Layer.WMS( "Windkaart 40m", "http://kratos0.ugent.be:8080/geoserver/Windsnelheid/wms", { LAYERS: 'Windsnelheid:Windsnelheid 40m', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer meteograms_tiled = new OpenLayers.Layer.WMS( "Meteograms Belgocontrol", "http://www.belgocontrol.be:80/geoserver/meteo/wms", { LAYERS: 'meteo:meteograms', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer swind_tiled = new OpenLayers.Layer.WMS( "Stedenbouwkundig vergunde windturbines", "https://www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/er/er_windturb/wms", { LAYERS: 'er_windturb', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer station_tiled = new OpenLayers.Layer.WMS( "EBBU Stations Belgocontrol", "http://www.belgocontrol.be:80/geoserver/belgocontrol/wms", { LAYERS: 'belgocontrol:stations_ebbu', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer zones_tiles = new OpenLayers.Layer.WMS( "EBBU Zones Belgocontrol", "http://www.belgocontrol.be:80/geoserver/aim/wms", { LAYERS: 'aim:EBBU_Zones', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup single tiled layer zones_untiled = new OpenLayers.Layer.WMS( "EBBU Zones Belgocontrol", "http://www.belgocontrol.be:80/geoserver/aim/wms", { LAYERS: 'aim:EBBU_Zones', transparent: true, format: 'image/png', buffer:0 }, { singleTile: true, ratio: 1, isBaseLayer: true, yx : {'EPSG:900913' : false} } );
// setup tiled layer zend_tiled = new OpenLayers.Layer.WMS( "Zendantennes", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/us/wms", { LAYERS: 'us:us_zndant', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer aan_anker_tiled = new OpenLayers.Layer.WMS( "Aangeduide ankerplaatsen", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_anker', transparent: true, format: 'image/png', buffer:0
}, { visibility: false });
// setup tiled layer etll_tiled = new OpenLayers.Layer.WMS( "Landschapsatlas - lijnrelict", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/lu/wms", { LAYERS: 'lu:lu_la_lr', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup single tiled layer etll_untiled = new OpenLayers.Layer.WMS( "Landschapsatlas - lijnrelict", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/lu/wms", { LAYERS: 'lu:lu_la_lr', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer etlp_tiled = new OpenLayers.Layer.WMS( "Landschapsatlas - puntrelict", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/lu/wms", { LAYERS: 'lu:lu_la_pr', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer etlr_tiled = new OpenLayers.Layer.WMS( "Landschapsatlas - relictzone", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/lu/wms", { LAYERS: 'lu:lu_la_rz', transparent: true, format: 'image/png', buffer:0 },
{ visibility: false } );
// setup tiled layer bl_tiled = new OpenLayers.Layer.WMS( "Beschermd landschap", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_land', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer bsed_tiled = new OpenLayers.Layer.WMS( "Beschermde stads- en dorpsgezichten", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_stdo', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer bos_tiled = new OpenLayers.Layer.WMS( "Bosreservaten", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_bosres', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer vogel_tiled = new OpenLayers.Layer.WMS( "Vogelrichtlijnen", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_vglrl', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer natuur_tiled = new OpenLayers.Layer.WMS( "Vlaamse Natuurreservaten", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_vlnres', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer hag_tiled = new OpenLayers.Layer.WMS( "Herbevestigde agrarische gebieden", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/lu/wms", { LAYERS: 'lu:lu_hag', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer bm_tiled = new OpenLayers.Layer.WMS( "Beschermde monumenten", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_monu', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer uw_tiled = new OpenLayers.Layer.WMS( "Unesco werelderfgoed", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_unesco', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer gd_tiled = new OpenLayers.Layer.WMS( "Gebieden duinendecreet", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_duin', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer VEN_tiled = new OpenLayers.Layer.WMS( "VEN en IVON gebieden", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_ven', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer RAMSAR_tiled = new OpenLayers.Layer.WMS( "RAMSAR richtlijnen", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_ramsar', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer SEVESO_tiled = new OpenLayers.Layer.WMS( "SEVESO richtlijnen", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/pf/wms", { LAYERS: 'pf:pf_seveso', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer bas_tiled = new OpenLayers.Layer.WMS( "Beschermde Archeologisceh sites", "https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms", { LAYERS: 'ps:ps_arch', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// add layers
map.addLayers([SEVESO_tiled, hag_tiled, zend_tiled, station_tiled, meteograms_tiled, zones_tiles, bas_tiled, RAMSAR_tiled, VEN_tiled, gd_tiled, uw_tiled, bm_tiled, natuur_tiled, vogel_tiled, bos_tiled, bsed_tiled, bl_tiled, etlr_tiled, etlp_tiled, etll_untiled, aan_anker_tiled]);
map.addLayers([layer, layer2]);
map.addLayers([swind_tiled, bufwind_tiled,defr_tiled, defo_tiled, defrood_tiled, deforan_tiled, kmirood_tiled, kmioranje_tiled, hoogspankl_tiled, hoogspanmid1_tiled, hoogspanmid2_tiled, hoogspanmid3_tiled, spoorkl_tiled, spoor1_tiled, spoor2_tiled, spoor3_tiled, waterkl_tiled, water1_tiled, water2_tiled,water3_tiled]);
map.addLayers([wind15_tiled,wind20_tiled,wind30_tiled,wind40_tiled]);
/*
infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ url: 'https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms', title: 'Identify features by clicking', layers: [bas_tiled,SEVESO_tiled, RASAR_tiled, VEN_tiled, gd_tiled, uw_tiled, bm_tiled, hag_tiled, natuur_tiled, vogel_tiled, bos_tiled, bsed_tiled, bl_tiled, etlr_tiled, etlr_tiled, etlp_tiled, etll_untiled], queryVisible: true })}
for (var i in infoControls) { infoControls[i].events.register("getfeatureinfo", this, showInfo); map.addControl(infoControls[i]); }
infoControls.click.activate();
function showInfo(evt) { if (evt.features && evt.features.length) { highlightLayer.destroyFeatures(); highlightLayer.addFeatures(evt.features); highlightLayer.redraw(); } else { document.getElementById('responseText').innerHTML = evt.text; } }
function toggleControl(element) { for (var key in infoControls) { var control = infoControls[key]; if (element.value == key && element.checked) { control.activate(); } else { control.deactivate(); } } }
function toggleFormat(element) { for (var key in infoControls) { var control = infoControls[key]; control.infoFormat = element.value; } }
function toggleLayers(element) { for (var key in infoControls) { var control = infoControls[key]; if (element.value == 'Specified') { control.layers = [water]; } else { control.layers = null; } } }
*/
// create Base layers
//define OSM base layer mapnik = new OpenLayers.Layer.TMS( "OpenStreetMap", "http://tile.openstreetmap.org/", { type: 'png', getURL: osm_getTileURL, displayOutsideMaxExtent: true,
} );
//define google satellite base layer //var gsat = new OpenLayers.Layer.Google( // "Google Satellite Imagery", // {'type': G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22} // );
//add hillshade wms layer // var hills = new OpenLayers.Layer.WMS('Hillshade Map',"http://129.206.229.145/hillshade?", // {layers:"europe_wms:hs_srtm_europa", transparent: true, format: 'image/png'}, // {isBaseLayer: false});
//define protocol for searching searchprotocol = new OpenLayers.Protocol.WFS.fromWMSLayer(layer,{srsName: "EPSG:900913"}) p = mapfish.Protocol.decorateProtocol({ protocol: searchprotocol, TriggerEventDecorator: null });
//define pseudo-layer for highlighting selected features var select = new OpenLayers.Layer.Vector("Selection", { protocol: p, strategies: [new mapfish.Strategy.ProtocolListener({append: false})], styleMap: new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]), displayInLayerSwitcher: false });
// add layers map.addLayers([mapnik]);
// setup tiled layer vp_tiled = new OpenLayers.Layer.WMS( "Vlaamse provincies", "http://kratos0.ugent.be:8080/geoserver/Grenzen/wms", { LAYERS: 'Grenzen:Provincies_Vlaanderen', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
// setup tiled layer vg_tiled = new OpenLayers.Layer.WMS( "Vlaamse gemeenten", "http://kratos0.ugent.be:8080/geoserver/Grenzen/wms", { LAYERS: 'Grenzen:Gemeentes_Vlaanderen', transparent: true, format: 'image/png', buffer:0
}, { visibility: false } );
/*
// setup tiled layer Gemeente = new OpenLayers.Layer.WMS( "Gemeentegrenzen", "http://geo.vliz.be:80/geoserver/Scheldemonitor/wms", { LAYERS: 'Scheldemonitor:bcommunes', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } );
// setup tiled layer Provincies = new OpenLayers.Layer.WMS( "Provincies", "http://geo.vliz.be:80/geoserver/Scheldemonitor/wms", { LAYERS: 'Scheldemonitor:bprovinces', transparent: true, format: 'image/png', buffer:0 }, { visibility: false } ); */
map.addLayers([vg_tiled,vp_tiled]);
var panel = new OpenLayers.Control.EditingToolbar(map); map.addControl(panel); geojson = new OpenLayers.Format.GeoJSON();
} //end addlayers
function setMapCenter() { //define a new projection object so map can be centred using latlong var proj = new OpenLayers.Projection("EPSG:4326"); var point = new OpenLayers.LonLat(4.4, 50.5); this.setCenter(point.transform(proj, this.getProjectionObject()), 8); } //end setMapCenter
Ext.onReady(function() {
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
//set up map var map = createMap(); addlayers(map);
// define the map controls and where they should all go infodiv = document.getElementById("info"); var scalep = infodiv.getElementsByTagName("p")[0]; map.addControl(new OpenLayers.Control.Scale(scalep));
//add mouse position in EPSG 27700 map.addControl(new OpenLayers.Control.MousePosition( {element: infodiv.getElementsByTagName("p")[4], numDigits:0}));
//add mouse position in EPSG 4326 var mousePositionlatlon = new OpenLayers.Control.MousePosition( {element: infodiv.getElementsByTagName("p")[2], numDigits:2, displayProjection: new OpenLayers.Projection("EPSG:4326")});
map.addControl(mousePositionlatlon);
map.addControl(new OpenLayers.Control.ScaleLine());
map.addControl(new OpenLayers.Control.Permalink());
//create toolbar var toolbar = new mapfish.widgets.toolbar.Toolbar({ map: map, configurable: false, id: 'toolbarid' });
// create a store to hold the county zoom data var shortcuts = new mapfish.widgets.Shortcuts({ map: map, store: countystore, templates: {header: new Ext.Template("Choose a region or county from the list"), footer: new Ext.Template("The map will zoom directly to it")}});
// create store to display results var store = new Ext.data.Store({ reader: new mapfish.widgets.data.FeatureReader({}, [ {name: 'projcode'}, {name: 'projectnam'}, {name: 'sitecode'}, {name: 'year', type: 'float'}, {name: 'projtype'}, {name: 'town'}, {name: 'county'}, {name: 'office'}]) });
// create search store mediator for adding search results to the store var searchstoreMediator= new mapfish.widgets.data.SearchStoreMediator({ protocol: p, store: store, append: false });
// create expander for search results var expander = new Ext.grid.RowExpander({ tpl: new Ext.Template('
Project Name: {projectnam}
', '
Project Type: {projtype}
', '
Project Code: {projcode}
', '
Site Code: {sitecode}
', '
Year: {year}
', '
Town: {town}
', '
County/Region: {county}
', '
Office: {office}
') });
//create viewport and items for components to live in var viewport = new Ext.Viewport({ layout:'border', listeners: { afterlayout: { fn: setMapCenter, scope: map, single: true } }, items:[ new Ext.BoxComponent({ region: 'north', el: 'north', height: 70 }),
{region: 'south', split: true, xtype: 'panel', title: 'Ruimtelijke informatie', margins: '0 0 0 0', height: 10, minSize: 175, maxSize: 400, collapsible: true, items: [] },
{region: 'east', split: true, xtype: 'panel', title: 'WK13 tool', margins: '0 0 0 0', width: 200, minSize: 175, maxSize: 400, collapsible: true, items: [
{title: 'Omschrijving', contentEl: 'help', border: false },
{title: '', contentE2: 'vak2', border: false }
] }, //end region definition
{region: 'west', id: 'west-panel', title: 'Info', margins: '0 0 0 5', width: 200, minSize: 175, maxSize: 400, collapsible: true, border: true, split: true, items: [{ contentEl: 'west', title: 'Lagen', el: 'tree', xtype: 'layertree', height: 500, border: false, collapsible: true, showWmsLegend: true, map: map},
{title: 'Kaart informatie', contentEl: 'info', border: false, collapsible: true},
/*
{title: 'Region/County Zoom', items: shortcuts, collapsed: true, collapsible: true, bodyStyle: 'padding: 7px', border: false},
{title: 'Postcode Zoom', xtype: 'datafieldrecenter', collapsed: true, collapsible: true, bodyStyle: 'padding: 7px 7px 7px 7px', listWidth: 200, width: 'auto', border: false, url: 'http://mapdata.thehumanjourney.net/featureserver/featureserver.cgi/postcodes_google', map: map, fieldLabel: 'Postcode', displayField: 'postcode'},
new Ext.grid.GridPanel ({ title: 'Zoek resultaten', region: 'south', plugins: expander, store: store, height: 300, width: 'auto', border: false, cm: new Ext.grid.ColumnModel([ expander, {id: 'projectnam', header: 'Project Name', sortable: true, dataindex: 'projectnam' }]),//end columns definition viewConfig: { forceFit:true } }) //end grid panel params */
]}, {region: 'center', id: 'map', title: 'Map', //layout: 'fit',// height: 'auto', xtype: 'mapcomponent', map: map, tbar: toolbar }
]
}); //end viewport setup
viewport.doLayout();
// define searcher to be activated by toolbar var searcher = new mapfish.Searcher.Map({ mode: mapfish.Searcher.Map.BOX, protocol: p });
//define spacers for toolbar var addSeparator = function(){ toolbar.add(new Ext.Toolbar.Spacer()); toolbar.add(new Ext.Toolbar.Separator()); toolbar.add(new Ext.Toolbar.Spacer()); }
// set up javascript zoom to initial view function zoominitial(){ var proj = new OpenLayers.Projection("EPSG:4326"); var bounds = new OpenLayers.Bounds(-16.43, 38.58, 20.35, 57.56) bounds.transform(proj, map.getProjectionObject()); map.zoomToExtent(bounds); };
//set up controls on toolbar
toolbar.addControl( new OpenLayers.Control.Button({ title: 'Zoom to initial map extent', trigger: zoominitial }), {iconCls: 'zoomfull', toggleGroup: 'map', icon: 'http://www.windkracht13.be/wp-content/uploads/2013/11/map1.png' } );
addSeparator();
toolbar.addControl( new OpenLayers.Control.ZoomBox({ title: 'Zoom in: click in the map or use the left mouse button and drag to create a rectangle' }), { iconCls: 'zoomin', toggleGroup: 'map', icon: 'http://www.windkracht13.be/wp-content/uploads/2013/11/zoom_in_16_ns.png' } );
toolbar.addControl( new OpenLayers.Control.ZoomBox({ out: true, title: 'Zoom out: click in the map or use the left mouse button and drag to create a rectangle' }), { iconCls: 'zoomout', toggleGroup: 'map', icon: 'http://www.windkracht13.be/wp-content/uploads/2013/11/zoom_out_16_ns.png' } ); /* toolbar.addControl( new OpenLayers.Control.DragPan({ isDefault: true, title: 'Pan map: keep the left mouse button pressed and drag the map' }), { iconCls: 'pan', toggleGroup: 'map', icon: 'http://www.windkracht13.be/wp-content/uploads/2013/11/hand.png' } ); */
addSeparator();
var nav = new OpenLayers.Control.NavigationHistory(); map.addControl(nav); nav.activate();
toolbar.add( new Ext.Toolbar.Button({ iconCls: 'back', tooltip: 'Previous view', handler: nav.previous.trigger, icon: 'http://www.windkracht13.be/wp-content/uploads/2013/11/arrow-back-sharp-thin.png' }) );
toolbar.add( new Ext.Toolbar.Button({ iconCls: 'next', tooltip: 'Next view', handler: nav.next.trigger, icon:'http://www.windkracht13.be/wp-content/uploads/2013/11/arrow-next-sharp-thin.png' }) );
addSeparator();
toolbar.addControl(searcher, { iconCls: 'infobox', togglegroup: 'map', tooltip: 'info', handler: info.activate, icon: 'http://www.windkracht13.be/wp-content/uploads/2013/11/info.png' }); //searcher.activate();
toolbar.activate();
// loading image Ext.get('loading').fadeOut({remove: true}); }); //end ext.onReady
// figure out which tiles we need from osm function osm_getTileURL(bounds) { var res = this.map.getResolution(); var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = Math.pow(2, z);
if (y < 0 || y >= limit) { return OpenLayers.Util.getImagesLocation() + "404.png"; } else { x = ((x % limit) + limit) % limit; return this.url + z + "/" + x + "/" + y + "." + this.type; } }
var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'https://www.mercator.vlaanderen.be:443/raadpleegdienstenmercatorpubliek/ps/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } });
info.activate(); map.addControl(info);
Laden van interactieve kaart
Laden …
Een selectie van waardevolle en gevoelige natuurgebieden in Vlaanderen wordt aan de hand van layers toegevoegd aan deze ruimtelijke informatie kaart.
Deze layers zijn gekoppeld aan de database van Mercator Vlaanderen, opgemaakt door de Afdeling Land en Bodembescherming,
Ondergrond, Natuurlijke Rijkdommen.
Door deze koppeling met deze database, blijft deze ruimtelijke informatie up-to-date.
Door het toevoegen van deze ruimtelijke informatie is het mogelijk voor de gebruiker om op een heel vlotte en accurate
manier rekening te houden met vastgelegde waardevolle en gevoelige gebieden tijdens het vergunningsverleningsproces.
Aansprakelijkheid: de ruimtelijke informatiekaart is louter ter informatie en heeft geen juridische kracht. De informatie die je in dit document vindt is bedoeld voor informatieve doeleinden.
- Met steun van:
Mouse Position (Lat/Lon):
Mouse Position (British National Grid):