function addPlots(map) {

    let input = document.getElementsByName("polygons");
    let pos = [];

    let actualPos = {
        lat: null,
        lng: null
    };

    for (let i = 0; i < input.length; i = i + 2) {
        actualPos = new google.maps.LatLng(input[i].value, input[i + 1].value);
        pos.push(actualPos);
    }

    let polygon = new google.maps.Polygon({
        paths: pos,
        strokeColor: '#ff8000',
        strokeOpacity: 0.8,
        strokeWeight: 2.5,
        fillColor: '#ff8000',
        fillOpacity: 0.35,
        map: map
    });
}
// This function creates a polygon with the inputs of general info of plots
This function creates a polygon with the inputs of general info of plots
This function creates a polygon with the inputs of general info of plots
function addPlots(map) {
    let input = document.getElementsByName("polygons");
    let pos = [];
    let actualPos = {
        lat: null,
        lng: null
    };
    for (let i = 0; i < input.length; i = i + 2) {
        actualPos = new google.maps.LatLng(input[i].value, input[i + 1].value);
        pos.push(actualPos);
    }
    let polygon = new google.maps.Polygon({
        paths: pos,
        strokeColor: '#ff8000',
        strokeOpacity: 0.8,
        strokeWeight: 2.5,
        fillColor: '#ff8000',
        fillOpacity: 0.35,
        map: map
    });
}
function addPlots ( map ) { let input = document . getElementsByName ( "polygons" ) ; let pos = [ ] ; let actualPos = { lat : null , lng : null } ; for ( let i = 0 ; i < input . length ; i = i + 2 ) { actualPos = new google . maps . LatLng ( input [ i ] . value , input [ i + 1 ] . value ) ; pos . push ( actualPos ) ; } let polygon = new google . maps . Polygon ( { paths : pos , strokeColor : '#ff8000' , strokeOpacity : 0.8 , strokeWeight : 2.5 , fillColor : '#ff8000' , fillOpacity : 0.35 , map : map } ) ; }
This function creates a polygon with the inputs of general info of plots
This function creates a polygon with the inputs of general info of plots