Google地图编码折线未按预期显示

时间:2016-09-21 21:00:30

标签: google-maps google-maps-api-3

我试图创建加拿大所有省份的编码折线。我从这个实用程序开始:

https://developers.google.com/maps/documentation/utilities/polylineutility

使用它我创造了许多点,尽可能地遵循安大略省的省线。这是结果折线的屏幕截图:

Polyline Utility Result

但是当我把折线插入代码来映射它时,它为我提供了部分不同的线:

http://jsfiddle.net/2x6eLLca/1/

    <html> 
<head> 
<title>Test</title> 
<script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=geometry&amp;sensor=false"></script>
<style type="text/css"> 
#map {width:670px;height:600px;}
</style> 
<script type='text/javascript'>
function initialize() {
    var myLatlng = new google.maps.LatLng(61.5780305,-107.1029399);
    var myOptions = {
        zoom: 3,
        center: myLatlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("map"), myOptions);

    var decodedPath = google.maps.geometry.encoding.decodePath('wkllHvswcQ_N`Kgl@jDJuEyIwIgv_TYuymWyusd@wbOqcLrgd@yvn@fqsH_ulc@iuMgppAhoWixv@v|oC}vXf`uD_{K`idAp}gApjkCynyCtwmB_`rIlobYsia@tmlFex}CtiiDov{Ov`KivImrH_gSc]gsDwhE}gAcc@{rBer@szI{zH{q_@_EufFkpDsoSicFi}L_EydG`r@slC~AygLeiCqsQcmG{eM~S_[_Bi`]dqHwgWdlCg}Wfnr@rhPpdWi`]hlGn|SnnMf_Lt_D`gShpEzgLni@~qIjc@puE}pAtcAaEfsDkc@zyEbxD|aObNbwMhmG~xLnuBraMpxBnr@jaItw\bkA`dCto@ucAtrBhqEcHvv@x{BfuCvrBn~Gd`y@nolAtrGtcA`gPpf\gv@~lEdxHnuP~i@xbHhaBzpCdaGqGbpEzeM`j@zpN|bKjdEr{F`~Pr|xAtkcAzWrjtJzwb@pn~Ajfe@}oUvbT_mE`oCrjDnpAor@nnDtcAvvAgaK~cAytAhtE|pCdbDePfnEivIfq@ujDr|BabDdhEeP`qLx{Df{sAvl~Ethc@vh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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB");

    var setRegion = new google.maps.Polyline({
        path: decodedPath,
        levels: decodedLevels,
        strokeColor: '#8A8000',
        strokeOpacity: 1.0,
        strokeWeight: 2,
        fillColor: '#8A8A1D',
        fillOpacity: 0,
        map: map
    });
}

function decodeLevels(encodedLevelsString) {
    var decodedLevels = [];

    for (var i = 0; i < encodedLevelsString.length; ++i) {
        var level = encodedLevelsString.charCodeAt(i) - 63;
        decodedLevels.push(level);
    }
    return decodedLevels;
}
</script> 
</head> 
<body onload="initialize()"> 
<div id="map"></div>
</body> 
</html>

enter image description here

任何想法为什么线偏离?我尝试了两次,每次都在中途转向。

由于

1 个答案:

答案 0 :(得分:0)

你需要逃避&#34; \&#34;字符串中的字符(替换单个&#34; \&#34;用双&#34; \\&#34;)。

变化:

var decodedPath = google.maps.geometry.encoding.decodePath('wkllHvswcQ_N`Kgl@jDJuEyIwIgv_TYuymWyusd@wbOqcLrgd@yvn@fqsH_ulc@iuMgppAhoWixv@v|oC}vXf`uD_{K`idAp}gApjkCynyCtwmB_`rIlobYsia@tmlFex}CtiiDov{Ov`KivImrH_gSc]gsDwhE}gAcc@{rBer@szI{zH{q_@_EufFkpDsoSicFi}L_EydG`r@slC~AygLeiCqsQcmG{eM~S_[_Bi`]dqHwgWdlCg}Wfnr@rhPpdWi`]hlGn|SnnMf_Lt_D`gShpEzgLni@~qIjc@puE}pAtcAaEfsDkc@zyEbxD|aObNbwMhmG~xLnuBraMpxBnr@jaItw\bkA`dCto@ucAtrBhqEcHvv@x{BfuCvrBn~Gd`y@nolAtrGtcA`gPpf\gv@~lEdxHnuP~i@xbHhaBzpCdaGqGbpEzeM`j@zpN|bKjdEr{F`~Pr|xAt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ntBykAjgA}Nn{EczBntEoj@heDm]}DomCpfE{YlnAgyIjnAut@qnBooDvg@yYse@efk@fpK_uBtjDs|c@xqH}yAucAeXf|FkrG~wRjNpfEtgAv}CpR|fGifAfiHgh@v|CsTnUabA`dC'); 

updated fiddle

fixed encoded polyline

代码段

&#13;
&#13;
google.maps.event.addDomListener(window, 'load', initialize);

function initialize() {
  var myLatlng = new google.maps.LatLng(61.5780305, -107.1029399);
  var myOptions = {
    zoom: 3,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map = new google.maps.Map(document.getElementById("map"), myOptions);

  var decodedPath = google.maps.geometry.encoding.decodePath('wkllHvswcQ_N`Kgl@jDJuEyIwIgv_TYuymWyusd@wbOqcLrgd@yvn@fqsH_ulc@iuMgppAhoWixv@v|oC}vXf`uD_{K`idAp}gApjkCynyCtwmB_`rIlobYsia@tmlFex}CtiiDov{Ov`KivImrH_gSc]gsDwhE}gAcc@{rBer@szI{zH{q_@_EufFkpDsoSicFi}L_EydG`r@slC~AygLeiCqsQcmG{eM~S_[_Bi`]dqHwgWdlCg}Wfnr@rhPpdWi`]hlGn|SnnMf_Lt_D`gShpEzgLni@~qIjc@puE}pAtcAaEfsDkc@zyEbxD|aObNbwMhmG~xLnuBraMpxBnr@jaItw\\bkA`dCto@ucAtrBhqEcHvv@x{BfuCvrBn~Gd`y@nolAtrGtcA`gPpf\\gv@~lEdxHnuP~i@xbHhaBzpCdaGqGbpEzeM`j@zpN|bKjdEr{F`~Pr|xAtkcAzWrjtJzwb@pn~Ajfe@}oUvbT_mE`oCrjDnpAor@nnDtcAvvAgaK~cAytAhtE|pCdbDePfnEivIfq@ujDr|BabDdhEeP`qLx{Df{sAvl~Ethc@vh`FxvfBlf_F?ra{@web@f{fAouc@~hRm|O_mEcaTnr@ohLq|HidConModBgaK{cDcaV{f`@_e_@{hBa`EfiAy}Cch@adCivDaqD{qC_mEukJcjA_gIohD}nB?afDq_BiwGtrAc{NyeAwlHw_C_tF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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB");

  var setRegion = new google.maps.Polyline({
    path: decodedPath,
    levels: decodedLevels,
    strokeColor: '#8A8000',
    strokeOpacity: 1.0,
    strokeWeight: 2,
    fillColor: '#8A8A1D',
    fillOpacity: 0,
    map: map
  });
}

function decodeLevels(encodedLevelsString) {
  var decodedLevels = [];

  for (var i = 0; i < encodedLevelsString.length; ++i) {
    var level = encodedLevelsString.charCodeAt(i) - 63;
    decodedLevels.push(level);
  }
  return decodedLevels;
}
&#13;
html,
body,
#map {
  width: 100%;
  height: 100%;
}
&#13;
<script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=geometry"></script>

<div id="map"></div>
&#13;
&#13;
&#13;