I have a XML string on a server. I need to have Open Layers get that, read it, and display it. It is connected to Grails. I know it is getting it because I have it alert me with the string. I tried this solution: https://gis.stackexchange.com/questions/16629/how-to-add-kml-data-but-from-variable-not-from-url
but couldn't get it to display. I have no errors in my JS console.
Thank you!
You might want to check two things:
yourLayer.features
Does it contain something? yourLayer.style
property is defined to a valid Style (meaning a Style instance that have renderers for the type of features). More on styling is OL here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.