我改寫了問題更具可讀性:GML V3加載與的OpenLayers
只見GML格式只是比KML多一點「進化」。我對嗎?哪種格式更加標準,更受支持,更便於投資?
我想這裏的例子(http://openlayers.org/dev/examples/vector-formats.html)試圖加載這樣定義的GML V3圈:
<gml:featureMember xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <feature:feature xmlns:feature="http://example.com/feature"> <feature:geometry> <gml:CircleByCenterPoint> <gml:pos>11.979491114616 43.847170472145</gml:pos> <gml:radius uom="km">25</gml:radius> </gml:CircleByCenterPoint> </feature:geometry> </feature:feature> </gml:featureMember>
示例程序無法加載此。一般來說,OpenLayers庫的限制似乎無法正確加載某種類型的GML文件,或者是什麼?我是否指定了無效的GML xml字符串?你知道在OpenLayers中支持GML格式的一些高級功能的一些限制嗎?
上的OpenLayers的GML V3類型只有加載GML V3文件通過讀()方法傳遞XML字符串並且使用HTTPProtocolOptions未指定文件被從服務器加載的可能性。爲什麼這個?有沒有我不明白的方法?
你有一些工作的GML文件的例子使用相對座標嗎?
謝謝。