我试图将带有label参数的字符串传递给路线渲染器.没有运气.它似乎忽略了我试图通过我的数组传递的任何字符串参数.我知道我可以使用除阵列之外的其他东西.但我更喜欢它,因为它让我更容易更新它.
function include(filename)
{
var head = document.getElementsByTagName('head')[0];
script = document.createElement('script');
script.src = filename;
script.type = 'text/javascript';
head.appendChild(script)
}
include('geoxml3.js');
include('v3_epoly.js');
var geoXml = null;
var map = null;
var geocoder = null;
var toggleState = 1;
var infowindow = null;
var marker = null;
var Ploc = null;
var directionDisplay;
var directionsService = new google.maps.DirectionsService();
//Voting Locations: Array element id = voting pct!
var Vloc = new Array();
Vloc[1] = '3790 S Houston St Kaufman tx 75142 (Kaufman County …Run Code Online (Sandbox Code Playgroud)