【问题标题】:kml file properties overriden by CSS in webpage网页中的 CSS 覆盖的 kml 文件属性
【发布时间】:2013-07-15 08:04:20
【问题描述】:

我有一张地图,它会在某个时候加载一个 kml 文件。 kml 包含使用 html 在 Google 地球中创建的带有信息窗口的轨迹。 问题是当我在网站上加载它时,它的属性被其余代码覆盖,例如:背景颜色、表格大小、边框等。

  1. 例如:我使用表格将地图和图例放在一起,但是这些 表属性由 kml 文件继承,并且 infowindows 被格式化为 页面其余部分的方式..

我能做些什么来阻止这种情况发生?

【问题讨论】:

    标签: html kml css-tables


    【解决方案1】:

    最好尝试像这样使用 iframe <body> <iframe width="700" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=https:%2F%2Fraw.github.com%2Fthroughnothing%2Fgpx%2Fmaster%2F2012%2F20120629.kml&amp;t=h&amp;ie=UTF8&amp;output=embed"> </iframe><br /> </body>

    参考此链接https://gist.github.com/throughnothing/3074654

    【讨论】:

      【解决方案2】:

      infowindow 属性表、td 等继承了我主页中的 css。这是因为我在 kml infowindows 中使用了网页样式。解决方案也非常简单,如here 所示。 我使用了不同的表类,这解决了问题:D

      【讨论】:

        猜你喜欢
        • 2018-10-28
        • 1970-01-01
        • 1970-01-01
        • 2013-08-16
        • 2015-04-24
        • 1970-01-01
        • 1970-01-01
        • 2013-07-30
        相关资源
        最近更新 更多