A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
53
reputation
4

Tim van Heteren

function initMap() {let osmLayer = new ol.layer.Tile({ source: new ol.source.OSM(), title: 'OSM basemap', type: 'base' }); let ESRILayer = new ol.layer.Tile({ source: new ol.source.XYZ({ url: 'https://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/{z}/{y}/{x}', attributions: ['Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'] }) }); map = new ol.Map({ target: 'map', layers: [osmLayer, stamenLayer], view: denboschView });let pandenDBSource = new ol.source.ImageWMS({ url: 'https://gmd.has.nl/geoserver/proefstudeerdag/wms', params: { 'LAYERS': 'proefstudeerdag:pandendb' } }); let pandenDBLayer = new ol.layer.Image({ source: pandenDBSource, title: 'Panden Den Bosch', visible: false }); map.addLayer(pandenDBLayer); map.on('singleclick', function(evt) { let viewResolution = /** @type {number} */ (denboschView.getResolution()); let getFeatureInfoUrl = pandenDBSource.getGetFeatureInfoUrl( evt.coordinate, viewResolution, 'EPSG:3857', { 'INFO_FORMAT': 'application/json' }); if (getFeatureInfoUrl) { // document.getElementById('info').innerHTML = // ''; console.log(getFeatureInfoUrl); $.ajax({ url: getFeatureInfoUrl, dataType: 'json' }).done(function(data) { $("#bouwjaar").html(data.features[0].properties.bouwjaar); $("#status").html(data.features[0].properties.status); $("#gebruiksdoel").html(data.features[0].properties.gebruiksdoel); }); }}); var layerSwitcher = new ol.control.LayerSwitcher({ tipLabel: 'Légende', // Optional label for button groupSelectStyle: 'children' // Can be 'children' [default], 'group' or 'none'}); map.addControl(layerSwitcher); } // end of Initmap /*JavaScript bestand met code om OpenLayers kaart te maken */$(document).ready(function() { initMap();}); enter image description here enter image description here enter image description here

0
answers
5
questions
~268
people reached
  • Member for 1 year
  • 3 profile views
  • Last seen 6 hours ago

Top network posts

We respect a laser-like focus on one topic.

Top tags (16)

Score 0
Posts 2
Posts % 40
Score 0
Posts 2
Score 0
Posts 2
Score 0
Posts 2
Score 0
Posts 2
Score 0
Posts 2

Top posts (5) All Questions Answers | Votes Newest

Badges (4)

Gold

Silver

Bronze

4

Rarest