Timeline for Reading GML features in OpenLayers 4?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 11, 2018 at 14:07 | comment | added | abd0991 | @senolozgur, I make a WPS request which return a gemoetry(s) in GML format, so I want to read this response as features so I can add them to the map. I read the content in the link but it doesn't work with me as I saw. | |
Apr 11, 2018 at 13:10 | comment | added | senol ozgur | How do you retrieve gml data? Do you access the source using ajax(i.e. after clicking a button)? If so you can check example at acuriousanimal.com/thebookofopenlayers3/… , part that starts as "// Source retrieving WFS data in GML format using AJAX" may help. Although the example is about ol3 I guess same approach will work for ol4. | |
Apr 9, 2018 at 12:08 | comment | added | abd0991 |
let feature = new ol.format.WFS().readFeatures(data, { dataProjection: 'EPSG:4326', featureProjection: 'EPSG:4326' });
|
|
Apr 9, 2018 at 12:07 | comment | added | abd0991 | I tried o.format.WFS and also the same result 'null' | |
Apr 9, 2018 at 11:46 | comment | added | abd0991 | No, but WMS or WFS? I will give it a try. | |
Apr 9, 2018 at 11:38 | comment | added | Senshi |
did you try with ol.format.WMS() ?
|
|
Apr 9, 2018 at 11:01 | comment | added | abd0991 | Thanks Senshi for the valuable information (for me as a beginner), so as I understand for my example I don't need to specify the featureNS and featureType, but when I execute the code above it returns a null result, so what is the problem? | |
Apr 9, 2018 at 7:00 | history | answered | Senshi | CC BY-SA 3.0 |