当前位置: 首页> 财经> 产业 > 百度刷排名百度快速排名_阿里巴巴1688批发网官网_腾讯推广一次广告多少钱_seo顾问服务公司站长

百度刷排名百度快速排名_阿里巴巴1688批发网官网_腾讯推广一次广告多少钱_seo顾问服务公司站长

时间:2025/8/24 8:04:44来源:https://blog.csdn.net/weixin_42172974/article/details/144511362 浏览次数:0次
百度刷排名百度快速排名_阿里巴巴1688批发网官网_腾讯推广一次广告多少钱_seo顾问服务公司站长

前端解析超图的iserver xml

        const res = await axios.get(url)const xmlDom = new DOMParser().parseFromString(res.data, 'text/xml');// 获取versionconst version = xmlDom.getElementsByTagNameNS('*', 'ServiceTypeVersion')[0].textContent// 获取layerconst layerDom = xmlDom.getElementsByTagNameNS('*', 'Layer')[0]const layer = layerDom.getElementsByTagNameNS('*', 'Identifier')[0].textContent// 获取styleconst styleDom = layerDom.getElementsByTagNameNS('*', 'Style')[0]const style = styleDom.getElementsByTagNameNS('*', 'Identifier')[0].textContent// 获取formatconst format = layerDom.getElementsByTagNameNS('*', 'Format')[0].textContent// 获取crsconst crsBoundingBox = layerDom.getElementsByTagNameNS('*', 'BoundingBox')[1]const crs = crsBoundingBox.attributes.crs.value// 获取TileMatrixSetconst TileMatrixSetBox = layerDom.getElementsByTagNameNS('*', 'TileMatrixSet')[2]const TileMatrixSet = TileMatrixSetBox.textContent// 获取serviceUrlconst ResourceURL = layerDom.getElementsByTagNameNS('*', 'ResourceURL')[0]const serviceUrl = ResourceURL.attributes.template.value.replace('{TileMatrixSet}', TileMatrixSet)// 获取四至const boundingBox = layerDom.getElementsByTagNameNS('*', 'BoundingBox')[0]const lowerCorner = boundingBox.getElementsByTagNameNS('*', 'LowerCorner')[0].textContentconst upperCorner = boundingBox.getElementsByTagNameNS('*', 'UpperCorner')[0].textContentconst xMin = parseFloat(lowerCorner.split(' ')[0])const yMin = parseFloat(lowerCorner.split(' ')[1])const xMax = parseFloat(upperCorner.split(' ')[0])const yMax = parseFloat(upperCorner.split(' ')[1])
关键字:百度刷排名百度快速排名_阿里巴巴1688批发网官网_腾讯推广一次广告多少钱_seo顾问服务公司站长

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: