简体   繁体   English

带有编码多边形的静态地图不显示

[英]Static map with encoded polygon not displaying

I'm having a difficult time figuring out why this static map isn't displaying.. I'm using encoded lines and polygons. 我很难弄清楚为什么不显示此静态地图。.我正在使用编码的线和多边形。 The lines display ok but not the polygon. 线显示确定,但多边形显示不出来。 I put the encoded polygon string into google's Interactive decoder and it works fine. 我将编码的多边形字符串放入Google的Interactive解码器中 ,并且工作正常。

Encoded Polygon 编码多边形

wl}vFlm{zN?gNfKIM}L|h@OSlB`Bj@l@h@nEGD{D|CNXrO`CHDdFaCHMxCkKNGgNyX{@?zOk^

This url is: 这个网址是:

http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:0x000000|enc:a||vFze|zN|E}cA&path=weight:3|color:0x000000|enc:qj{vFny{zNyTaO}QtWoE|W&path=weight:3|fillcolor:0x0000FF|color:0x0000FF|enc:wl}vFlm{zN?gNfKIM}L|h@OSlB`Bj@l@h@nEGD{D|CNXrO`CHDdFaCHMxCkKNGgNyX{@?zOk^&maptype=hybrid&sensor=false

I also tried url encoding the polygon string with no luck. 我也尝试用URL编码多边形字符串而没有运气。

http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:0x000000|enc:a%7C%7CvFze%7CzN%7CE%7DcA&path=weight:3|color:0x000000|enc:qj%7BvFny%7BzNyTaO%7DQtWoE%7CW&path=weight:3|fillcolor:0x0000FF|color:0x0000FF|enc:wl%7DvFlm%7BzN%3FgNfKIM%7DL%7Ch%40OSlB%60Bj%40l%40h%40nEGD%7BD%7CCNXrO%60CHDdFaCHMxCkKNGgNyX%7B%40%3FzOk%5E&maptype=hybrid&sensor=false

They were encoded using: 它们使用以下方式编码:

points_array = mapOverlays[i].getPath(); 
enc = google.maps.geometry.encoding.encodePath(points_array);

Was hoping someone more knowledgeable than I could spot why this isn't displaying for me. 希望有人比我能发现的更多知识,为什么这对我不显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM