码迷,mamicode.com
首页 > 其他好文 > 详细

openlayers read xml

时间:2015-01-19 22:34:13      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:

       OpenLayers.Request.GET({
            url: "/Panos/" + name + "/Editer" + name + ".xml",
            success: function (request) {
                var direction = 0;
                var panoXmlFormat = new OpenLayers.Format.XML();
                var panoXml = panoXmlFormat.read(request.responseXML || request.responseText);
                if (panoXml.documentElement.getElementsByTagName(‘hotspot‘)) {
                    direction = parseFloat(panoXml.documentElement.getElementsByTagName(‘hotspot‘)[0].getAttribute(‘direction‘));
                }
                ShowPanorama(name, evt.feature.geometry, direction);
            },
            failure: function () {

            },
            scope: this
        });

openlayers read xml

标签:

原文地址:http://www.cnblogs.com/firekylin/p/4234804.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!