0

I want to paint any country with any color and cover it in google maps. I find a way to draw polygon by coordinates:

    var mypolygon;
    var polyCoords = [
      new google.maps.LatLng(40.96985437850034, 45.871337890625),
        new google.maps.LatLng(40.936664923030236, 49.00244140625),
        new google.maps.LatLng(39.76454453848205, 47.50830078125)
    ];
    mypolygon = new google.maps.Polygon({
        paths: polyCoords,
        strokeColor: "#FF0000",
        strokeOpacity: 1,
        strokeWeight: 2,
        fillColor: "#FF0000",
        fillOpacity: 1
    });
    mypolygon.setMap(map);

It works, but it is not possible (or its very difficult) to find all border coordinates of country. Asume that possible. It will be approximately, not exactly.

Is there any way to cover a country with any color by it's name? For example, for our country - Azerbaijan: "az".

Jeyhun Rahimov
  • 3,769
  • 6
  • 47
  • 90

0 Answers0