javascript - polyline in rails using js -


i'm trying draw simple polylines in js (rails) ain't showing anything.

function drawlines() {     var flightpath = new google.maps.polyline({     path: flightplancoordinates,     geodesic: true,     strokecolor: '#ff0000',     strokeopacity: 1.0,     strokeweight: 25,     map:map     });  flightpath.setmap(map); console.log('drawn'); } 

i suggest code. in code, don't need use settings map:map.

try code

function drawlines(){          var flightpath = new google.maps.polyline({           path: flightplancoordinates,           geodesic: true,           strokecolor: '#ff0000',           strokeopacity: 1.0,           strokeweight: 25,          });         flightpath.setmap(map); } 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -