Polylines

“Indiana State Fair Tractor Drive” map shows how easy is to add polyline to the code generated by MapBuilder.
Here’s the actual code to build polyline:

// Add polyline
var TractorDrive = new Array(
new GPoint(-86.17002010345459, 39.771504066537645),
new GPoint(-86.16152286529541, 39.771306157391855),
new GPoint(-86.16165161132812, 39.768601342041286),
new GPoint(-86.15890502929688, 39.76846939711062),
new GPoint(-86.15804672241211, 39.767842655236535),
new GPoint(-86.15718841552734, 39.768403424550456),
new GPoint(-86.1579179763794, 39.76903016131954),
new GPoint(-86.15757465362549, 39.77796878575054),
new GPoint(-86.1571455001831, 39.78944546454763),
new GPoint(-86.15731716156006, 39.794985245044494),
new GPoint(-86.15701675415039, 39.798249549632104),
new GPoint(-86.15650177001953, 39.80392049827307),
new GPoint(-86.15306854248047, 39.80603049931308),
new GPoint(-86.14954948425293, 39.80612940402307),
new GPoint(-86.14495754241943, 39.808601975532106),
new GPoint(-86.14375591278076, 39.80965691231115),
new GPoint(-86.14354133605957, 39.81028327336426),
new GPoint(-86.14371299743652, 39.81387649754178),
new GPoint(-86.14354133605957, 39.81433799896189),
new GPoint(-86.13933563232422, 39.81763434756231),
new GPoint(-86.13757610321045, 39.82037019683298),
new GPoint(-86.13495826721191, 39.82234785137201),
new GPoint(-86.13161087036133, 39.82531422646072),
new GPoint(-86.12950801849365, 39.82785202349348)
);
//Add Polyline Overlay
map.addOverlay(new GPolyline(TractorDrive));

Leave a Reply