Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <title>WFS</title>
- <link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
- <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
- <script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
- </head>
- <body>
- <div id="map" class="map"></div>
- <script>
- var vectorSource = new ol.source.Vector({
- format: new ol.format.GeoJSON(),
- url: function(extent) {
- 'bbox=' + extent.join(',') + ',EPSG::4326';
- 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';
- },
- strategy: ol.loadingstrategy.bbox
- });
- var vector = new ol.layer.Vector({
- source: vectorSource,
- style: new ol.style.Style({
- stroke: new ol.style.Stroke({
- color: 'rgba(0, 0, 255, 1.0)',
- width: 2
- })
- })
- });
- var map = new ol.Map({
- layers: [vector], //raster,
- target: document.getElementById('map'),
- view: new ol.View({
- center: [28.51234567, 41.072437216],//,
- //center: [0, 0],
- maxZoom: 500,
- zoom: 12
- })
- });
- </script>
- Uncaught TypeError: (0 , Sq[a.type]) is not a function
- at Rq (ol.js:557)
- at Qq.k.dd (ol.js:560)
- at Qq.k.Mg (ol.js:561)
- at Qq.k.Qa (ol.js:474)
- at U.<anonymous> (ol.js:472)
Add Comment
Please, Sign In to add comment