Guest User

Untitled

a guest
Apr 27th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. <title>WFS</title>
  2. <link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
  3. <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
  4. <script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
  5. </head>
  6. <body>
  7. <div id="map" class="map"></div>
  8. <script>
  9. var vectorSource = new ol.source.Vector({
  10. format: new ol.format.GeoJSON(),
  11. url: function(extent) {
  12. 'bbox=' + extent.join(',') + ',EPSG::4326';
  13. return 'http://10.41.66.11:6080/arcgis/services/Mobile/WFS_Test/MapServer/WFSServer?request=GetFeature&service=WFS&outputFormat=esrigeojson&typeNames=Mobile_WFS_Test:TESIS2.D_DIREK_OG';
  14. },
  15. strategy: ol.loadingstrategy.bbox
  16. });
  17.  
  18.  
  19. var vector = new ol.layer.Vector({
  20. source: vectorSource,
  21. style: new ol.style.Style({
  22. stroke: new ol.style.Stroke({
  23. color: 'rgba(0, 0, 255, 1.0)',
  24. width: 2
  25. })
  26. })
  27. });
  28.  
  29. var map = new ol.Map({
  30. layers: [vector], //raster,
  31. target: document.getElementById('map'),
  32. view: new ol.View({
  33. center: [28.51234567, 41.072437216],//,
  34. //center: [0, 0],
  35. maxZoom: 500,
  36. zoom: 12
  37. })
  38. });
  39. </script>
  40.  
  41. Uncaught TypeError: (0 , Sq[a.type]) is not a function
  42. at Rq (ol.js:557)
  43. at Qq.k.dd (ol.js:560)
  44. at Qq.k.Mg (ol.js:561)
  45. at Qq.k.Qa (ol.js:474)
  46. at U.<anonymous> (ol.js:472)
Add Comment
Please, Sign In to add comment