如何使用JAK API自定义GOOGLE MAP(KML)的工具提示

时间:2014-03-31 01:20:33

标签: google-maps jak

我在谷歌地图中的工具提示有问题。

正如您所看到的,我的地图中有一个多边形。但是当我在kml显示中看到这个多边形时,会切断工具提示的显示(单击区域图)。

为了实现这个地图,我使用了一个KML文件,KML是用JAK API生成的。

我认为应该可以用api修改工具提示的CSS,但我不知道如何。我已经搜索了几个小时。

我不是这个API和谷歌地图的专家。所以如果你有任何建议来解决这个问题,请不要犹豫。我要继续搜索。

非常感谢您的帮助。

您将在下面找到一组解释问题的图片:

enter image description here enter image description here

URL测试KML文件:

http://display-kml.appspot.com/

KML文件的内容:

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
    <Document>
        <name>IBR</name>
        <Style>
            <PolyStyle id="toolTip">
                <color>0xb9cbf1</color>
                <colorMode>normal</colorMode>
                <fill>1</fill>
                <outline>1</outline>
            </PolyStyle>
        </Style>
        <Style>
            <LineStyle id="lineStyle">
                <color>0x666ef8</color>
                <width>1.0</width>
            </LineStyle>
        </Style>           
        <Placemark>
            <name>Edmonton Yp</name>
            <styleUrl>#toolTip</styleUrl>
            <Polygon>
                <extrude>1</extrude>
                <altitudeMode>relativeToGround</altitudeMode>
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates>-113.99345397949219,53.65755844116211 -113.98419189453125,53.59413146972656 -113.93543243408203,53.42497253417969 -113.68433380126953,53.25069046020508 -113.68347930908203,53.250675201416016 -113.67694091796875,53.250667572021484 -113.39179992675781,53.25058364868164 -113.3207778930664,53.25060272216797 -112.96499633789062,53.39612579345703 -112.87796020507812,53.45442199707031 -112.80402374267578,53.51348114013672 -112.80384826660156,53.54147720336914 -112.80400848388672,53.57035827636719 -112.95169067382812,53.65762710571289 -113.29582214355469,53.71658706665039 -113.56759643554688,53.720455169677734 -113.93214416503906,53.71586608886719 -113.93550872802734,53.715370178222656 -113.99345397949219,53.65755844116211</coordinates>
                    </LinearRing>
                </outerBoundaryIs>
            </Polygon>
        </Placemark>
      </Document>
</kml>

0 个答案:

没有答案