ИСПОЛЬЗУЯ GEOJSON
<div id="googleMap" style="width:500px;height:380px;"></div>
// define map properties
var mapProp = {
center: new google.maps.LatLng(23.075984, 78.877656),
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
//create google map
var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
// define geojson
var geojson = {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[0, 90],
[180, 90],
[180, -90],
[0, -90],
[-180, -90],
[-180, 0],
[-180, 90],
[0, 90]
],
[
[79.56298828125, 25.18505888358067],
[76.53076171875, 21.37124437061832],
[83.38623046875, 21.24842223562701],
[79.56298828125, 25.18505888358067]
]
]
},
"properties": {}
}]
};
//add geojson to map
map.data.addGeoJson(geojson);
в случае использования внешнего файла geojson
map.data.loadGeoJson('url-to-geojson-file');
примечание: Google использовал .json как расширение для файла geojson, а не .geojson
https://developers.google.com/maps/documentation/javascript/datalayer
создайте свой геойсон здесь
https://google -developers.appspot.com / карты / документы / Utils / GeoJSON /
рабочий пример
https://jsfiddle.net/841emtey/5/