I'm trying to make a square with the coordinates, but it does not appear. You do not have any errors in the browser, the map is created normally, only the square does not appear:
var map;
function initialize() {
var latlng = new google.maps.LatLng(-21.723254, -49.356317);
var options = {
zoom:30,
center: latlng,
mapTypeId: google.maps.MapTypeId.SATELLITE
};
map = new google.maps.Map(document.getElementById('map'), options);
var geocoder = new google.maps.Geocoder();
var princiCoords = [
new google.maps.LatLng(-21.724394, -49.356391),
new google.maps.LatLng(-21.724172, -49.356479),
new google.maps.LatLng(-21.724044, -49.356040),
new google.maps.LatLng(-21.724257, -49.355960)
];
var princiPolygon = new google.maps.Polygon({
// Coordenadas do seu objeto
paths: princiCoords,
// Cor do da linha
strokeColor: '#E12D93',
// Opacidade da linha
strokeOpacity: 0.8,
// Espessura da linha
strokeWeight: 4,
// Cor de preenchimento do objeto
fillColor: '#942E7C',
// Opacidade do preenchimento
fillOpacity: 0.35
});
princiPolygon.setMap(map);
}
initialize();