Wednesday, December 3, 2014

You can even set up a WMS server and output as styling as you want. The administrative boundaries a


var layer = new municipal OpenLayers.Layer.WMS ("Municipal boundaries", "http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wms?" {layers: "gemeenten_2012" format "image / png" transparent: true} , {singleTile: false, buffer 0, isBaseLayer: false, visibility: true, opacity: 0.5, displayInLayerSwitcher: false}); map.addLayer (municipal layer);
style: {fillColor "darkred" stroke color: "red", stroke width: 2 strokeOpacity: 0.5, external graphic: "img / 008.png" graphic width: 12 graphic height: 12 point range: etage 12 Cursor: "pointer" ,}
Ha Allrouds, Thanks for the suggestion. But unfortunately it does not work. The WMS server does not respond to these options. It is not a vector layer, but a tile layer. Maybe there are smarter ways to project the municipal boundaries on a map? Not through the OPOC WMS service?
You do know always make beautiful cards! What you do, I have also tried: get inside the municipal through the overpass api. But that presented etage a problem: I got 25 MB of data inside for only Gelderland.
overpass-api.de/api/interpreter?data=(relation[name~"Aalten|Apeldoorn|Arnhem|Barneveld|Berkelland|Beuningen|Bronckhorst|Brummen|Buren|Culemborg|Doesburg|Doetinchem|Druten|Duiven|Ede|Elburg|Epe|Ermelo|Geldermalsen|Groesbeek|Harderwijk|Hattem|Heerde|Heumen|Lingewaal|Lingewaard|Lochem|Maasdriel|Millingen|Montferland|Neder-Betuwe|Neerijnen|Nijkerk|Nijmegen|Nunspeet|Oldebroek|Oost|Oude|Overbetuwe|Putten|Renkum|Rheden|Rijnwaarden|Rozendaal|Scherpenzeel|Tiel|Ubbergen|Voorst|Wageningen|West|Westervoort|Wijchen|Winterswijk|Zaltbommel|Zevenaar|Zutphen"][admin_level=8];>;);out+skel;
Re: formatting OPOC WMS administrative boundaries
The advantage of the overpass api is that I only need one time to load; WMS server continues to send at any zoom level tiles. The WMS server is not very fast, though. The amount of vector data from OSM is very much more than the WMS tiles.
var url = "http://overpass-api.de/api/interpreter?data=(relation[name~'Aalten|Apeldoorn|Arnhem|Barneveld|Berkelland|Beuningen|Bronckhorst|Brummen|Buren|Culemborg|Doesburg|Doetinchem|Druten|Duiven|Ede|Elburg|Epe|Ermelo|Geldermalsen|Groesbeek|Harderwijk|Hattem|Heerde|Heumen|Lingewaal|Lingewaard|Lochem|Maasdriel|Millingen|Montferland|Neder-Betuwe|Neerijnen|Nijkerk|Nijmegen|Nunspeet|Oldebroek|Oost|Oude|Overbetuwe|Putten|Renkum|Rheden|Rijnwaarden|Rozendaal|Scherpenzeel|Tiel|Ubbergen|Voorst|Wageningen|West|Westervoort|Wijchen|Winterswijk|Zaltbommel|Zevenaar|Zutphen'][admin_level=8](51.7,5.09,52.47,6.68);way(r);node(w););out+skel;";
You can even set up a WMS server and output as styling as you want. The administrative boundaries are part of the TOP10NL (and exists as TOPgrenzen-product), with which you NLExtract in a PostGIS database loaded. With MapServer can offer data than through WFS and / or WMS services. For a bit of performance you want to have the WMS service etage caching with something like MapCache or TileCache.
Sebastic: your last suggestion I tried. Unfortunately, the WFS server provides all kinds of error messages back. No idea what the server wants from me. The documentation of the WFS service is nil. Grr. No examples. I have therefore but what mustered:
var layer = new municipal OpenLayers.Layer.Vector ("Municipal boundaries", {strategies: [new OpenLayers.Strategy.BBOX ()], StyleMap: gemeenteGrenzenStyleMap, protocol: new OpenLayers.Protocol.WFS ({version: "1.1.0" url: "http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs" request "GetFeature" feature type "administrative boundaries: gemeenten_2012" srsName "EPSG: 28992" featureNS "http: //bestuurlijkegrenzen.geonovum .com "geometryName 'geometry'})}); map.addLayer etage (municipal layer);
<Ows <? Xml version = "1.0" encoding = "UTF-8"?>: Exception Report version = "2.0.0" xsi: schemaLocation = "http://www.opengis.net/ows/1.1 http: // geodata.nationaalgeoregister.nl/schemas/ows/1.1.0/owsAll.xsd "xmlns: ows =" http://www.opengis.net/ows/1.1 "xmlns: xsi =" http: //www.w3. org / 2001 / XMLSCHEMA instance "> <ows: Exception Exception code =" Missing Parameter Value "locator =" request "> <ows: Exception Text> Could not determining geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@1c24c126</ows:ExceptionText> </ Ows: Exception> </ ows: Exception Report>
wfs_layers [key] [i] = new OpenLayers.Layer.Vector (layer_name, {strategies: [new OpenLayers.Strategy.BBOX ()] protocol: new OpenLayers.Protocol.WFS ({version: "1.0.0", srsName "EPSG: 28992", url: "http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs' featureP

No comments:

Post a Comment