Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var testef = [{
- "Id": 1,
- "Latitude": 38.726177,
- "Longitude": -9.180716
- },
- {
- "Id": 2,
- "Latitude": 38.716177,
- "Longitude": -9.170716
- },
- {
- "Id": 3,
- "Latitude": 38.736177,
- "Longitude": -9.160716
- },
- {
- "Id": 4,
- "Latitude": 38.729177,
- "Longitude": -9.110716
- }];
- //traçando a rota
- for(var k=0; k < testef.length; k++){
- var objk=testef[k];
- var mypath = new google.maps.LatLng(objk.Latitude,objk.Longitude);
- var teste = new google.maps.Polyline({
- path: mypath,
- geodesic: true,
- strokeColor: '#ff0000',
- strokeOpacity: 1.0,
- strokeWeight: 3
- });
- }
- teste.setMap(map);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement