无法覆盖的KML文件

我生成KML文件上最fly.After发生,我叫谷歌地图是这样的:

http://maps.google.com/maps?q=http://<my ip>:8081/<location>/<name>.kml 。 我用的是文件的名称是根据纬度/长由用户输入的起始位置。 显然,当该位置是相同的,一个新的KML文件生成从同一位置开始。 在这种情况下,老人们应该被覆盖,它是。 但是,它给谷歌地图时,谷歌地图显示旧文件。 我从两个示例文件和Python代码片段连接来说明情况:

import sys import simplekml kml=simplekml.Kml() data=open(sys.argv[1],'r') for line in data: points=line.split(' ') #speed=float(points[9])*3.6 poly=kml.newpolygon(description=("Segment number"+str(points[0])),outerboundaryis=[(float(points[2]),float(points[1])),(float(points[4]),float(points[3])),(float(points[6]),float(points[5])),(float(points[8]),float(points[7]))]) poly.polystyle.outline=0 kml.save("overwrite1.kml")

我把这个代码示例两次,有两个不同的文件,片段这些都是贴在下面。 文件1:

90 17.44868272235051 78.35992655187812 17.448697277638573 78.35983344811831 17.448738277640214 78.35984044810797 17.44872372234887 78.35993355188845 91 17.4486465880062 78.35986774305402 17.448733411989906 78.35989225695096 17.448203411899485 78.36194225741018 17.448116588096628 78.36191774259473 92 17.44811737513277 78.36191508602762 17.44820262486316 78.3619449139783 17.447872624807378 78.36297491419779 17.447787375188554 78.36294508580814 93 17.44778593144203 78.36295056347981 17.447874068554235 78.36296943652408 17.44777406853705 78.36347943664289 17.44768593145922 78.36346056336097 94 17.447725298386487 78.3635168529482 17.44773470160246 78.36342314704976 17.448464701620733 78.36350314686737 17.448455298368216 78.36359685313049 95 17.44844964150418 78.36359591532924 17.44847035848529 78.36350408466528 17.44916035852647 78.36367408449023 17.449139641463 78.36376591550432 96 17.44914388953053 78.36376671292972 17.44915611045848 78.36367328706736 17.450066110488546 78.36380328683892 17.45005388950045 78.36389671315817 97 17.45007148384362 78.36389560619496 17.450048516146023 78.36380439381118 17.45084851609243 78.36358439360971 17.450871483897217 78.36367560639643 98 17.4508625677922 78.36367697298195 17.450857432196702 78.3635830270191 17.451527432187646 78.36354302685181 17.451532567801255 78.36363697314921 99 17.45152818002525 78.3636369943884 17.45153181996366 78.36354300561091 17.454841819995337 78.36368300478371 17.45483817999356 78.36377699521559

文件2:

17473 17.44436514856338 78.47057386682884 17.444454851433058 78.47056613316957 17.444460851434094 78.470642133188 17.444371148562336 78.4706498668104 17474 17.496817749620345 78.3936639958953 17.496902250375502 78.39369600411102 17.496642250331544 78.39444600426742 17.49655774966431 78.39441399573903 17475 17.471726433843678 78.56706897439275 17.471793566150335 78.5671310256177 17.471353566083877 78.56765102565059 17.47128643391013 78.5675889743598 17476 17.47585253344295 78.56776331893766 17.47588746654784 78.56767668105347 17.476727466633236 78.56804668087453 17.476692533357554 78.56813331911657 17477 17.47712250351409 78.56712330514262 17.477157496476696 78.56703669484854 17.47860749662435 78.56767669454003 17.47857250336645 78.5677633054511 17478 17.478630673594786 78.56773989598412 17.47854932640072 78.56770010402349 17.478849326351025 78.5670301041477 17.478930673644467 78.56706989586 17479 17.478886419731488 78.56709693560659 17.478893580257395 78.56700306439186 17.479253580264213 78.56703306430197 17.479246419724667 78.56712693569652 17480 17.47929464334328 78.56708587636851 17.47920535665311 78.56707412363394 17.479505356601035 78.5645841242342 17.479594643395355 78.5645958757682 17481 17.48534674355407 78.56693717788423 17.485433256442004 78.56696282212097 17.485083256382193 78.56825282240784 17.484996743613884 78.56822717759738 17482 17.485021447069396 78.56828279163804 17.485058552921615 78.56819720835271 17.485248552941915 78.56828720831444 17.4852114470491 78.56837279167631

从第一KML文件片段:

<tessellate>0</tessellate> <extrude>0</extrude> <coordinates>78.363676973,17.4508625678,0.0 78.363583027,17.4508574322,0.0 78.3635430269,17.4515274322,0.0 78.3636369731,17.4515325678,0.0</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> <styleUrl>#stylesel_98</styleUrl> <visibility>1</visibility> <open>0</open> <description>Segment number98</description> </Placemark> <Placemark id="feat_200"> <Polygon id="geom_198"> <tessellate>0</tessellate> <extrude>0</extrude> <outerBoundaryIs> <LinearRing> <tessellate>0</tessellate> <extrude>0</extrude> <coordinates>78.3636369944,17.45152818,0.0 78.3635430056,17.45153182,0.0 78.3636830048,17.45484182,0.0 78.3637769952,17.45483818,0.0</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> <styleUrl>#stylesel_99</styleUrl> <visibility>1</visibility> <open>0</open> <description>Segment number99</description> </Placemark> </Document> </kml>

从第二个KML文件片段:

<tessellate>0</tessellate> <extrude>0</extrude> <coordinates>78.5669371779,17.4853467436,0.0 78.5669628221,17.4854332564,0.0 78.5682528224,17.4850832564,0.0 78.5682271776,17.4849967436,0.0</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> <styleUrl>#stylesel_98</styleUrl> <visibility>1</visibility> <open>0</open> <description>Segment number17481</description> </Placemark> <Placemark id="feat_200"> <Polygon id="geom_198"> <tessellate>0</tessellate> <extrude>0</extrude> <outerBoundaryIs> <LinearRing> <tessellate>0</tessellate> <extrude>0</extrude> <coordinates>78.5682827916,17.4850214471,0.0 78.5681972084,17.4850585529,0.0 78.5682872083,17.4852485529,0.0 78.5683727917,17.485211447,0.0</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> <styleUrl>#stylesel_99</styleUrl> <visibility>1</visibility> <open>0</open> <description>Segment number17482</description> </Placemark> </Document> </kml>

产生的,在这两种情况下:(相同KML文件的快照:〔I清零缓存甚至,使得第二请求之前]:

谢谢。 (抱歉长的描述,但是,我希望他们把事情说清楚)

--------------解决方案-------------

在谷歌地图缓存KML阿谷歌查询,似乎表明谷歌正在缓存KML文件5分钟左右。

一个简单的解决方案是一个随机的查询,添加,所以不是链接向你的网址, http://maps.google.com/maps?q=http://<my ip>:8081/<location>/<name>.kml ,你会链接到http://maps.google.com/maps?q=http://<my ip>:8081/<location>/<name>.kml?rnd=<somerandomvalue>

您的Web服务器会忽略它,但谷歌会认为这是一个新的URL,并重新获取它。

分类:蟒蛇 时间:2015-03-15 人气:0
本文关键词: 蟒蛇,KML
分享到:

相关文章

Copyright (C) 55228885.com, All Rights Reserved.

55228885 版权所有 京ICP备15002868号

processed in 0.311 (s). 10 q(s)