<div id="map"></div>
<script async src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCfX7L7RJvQa31tA7sL-dvoXAsNBT3786A&callback=initMap"></script>
#map {
height: 100%;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
function initMap() {
const map = new google.maps.Map(document.getElementById("map"), {
center: { lat: 35.67369269880291, lng: 139.7586677640881 },
zoom: 17,
mapId: "cbe762841f29138f"
});
map.data.addGeoJson({
type: "FeatureCollection",
features: [
{
type: "Feature",
properties: {},
geometry: {
coordinates: [
[
[139.75715452555397, 35.67501088740674],
[139.75715452555397, 35.672275911172164],
[139.7609465361483, 35.672275911172164],
[139.7609465361483, 35.67501088740674],
[139.75715452555397, 35.67501088740674]
]
],
type: "Polygon"
}
}
]
});
map.data.setStyle({
fillColor: "#000088",
fillOpacity: 1.0,
});
}
window.initMap = initMap;
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.