function initMap() {
var location = {"lat":48.86311786793698,"lng":2.34391535194203};
var locations = [{"type":0,"name":"Hexaglobe","coordinates":{"lat":48.86254808913768,"lng":2.351997793860238}},{"type":1,"name":"Musée du Louvre","coordinates":{"lat":48.86267788729752,"lng":2.3378368895477513}},{"type":2,"name":"Arc de Triomphe","coordinates":{"lat":48.87634057329263,"lng":2.295093210474901}},{"type":3,"name":"Tour Eiffel","coordinates":{"lat":48.86030629740222,"lng":2.294406565027948}},{"type":4,"name":"Notre Dame","coordinates":{"lat":48.853130547647474,"lng":2.3498913694645145}}];
var marker_type = [{"color":"#4A98FF","icon":"https://hexaglobe.com/content/uploads/2022/09/map-pin-c_1-1.svg","width":"35","height":"45"},{"color":"#4A98FF","icon":"https://hexaglobe.com/content/uploads/2022/09/map-louvre-pyramid-c_1-1.svg","width":"54","height":"54"},{"color":"#4A98FF","icon":"https://hexaglobe.com/content/uploads/2022/09/map-arc-triomphe-c_1-1.svg","width":"54","height":"46"},{"color":"#4A98FF","icon":"https://hexaglobe.com/content/uploads/2022/09/map-eiffel-tower-c_1-1.svg","width":"54","height":"46"},{"color":"#4A98FF","icon":"https://hexaglobe.com/content/uploads/2022/09/map-notre-dame-c_1-1.svg","width":"54","height":"51"}];
var map = new google.maps.Map(
document.getElementById('g_map'),
{
zoom: 13,
center: location,
draggable: true,
scrollwheel: true,
navigationControl: false,
panControl: false,
zoomControl: false,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
overviewMapControl: false,
styles: [
{
featureType: 'administrative.land_parcel',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'administrative.neighborhood',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'poi',
elementType: 'labels.text',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'poi.business',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'road',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'road',
elementType: 'labels.icon',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'transit',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'water',
elementType: 'labels.text',
stylers: [
{
visibility: 'off',
},
],
},
],
}
);
for (location of locations) {
var marker = new google.maps.Marker({
position: location.coordinates,
map: map,
label: {
text: ' ',
fontSize: '18px',
fontWeight: '500',
lineHeight: '18px',
//height: "15px",
//width: "10px",
color: marker_type[0].color,
fontFamily: 'Gotham',
textAlign: 'center',
},
title: location.name,
icon: {
url: marker_type[location.type].icon,
scaledSize: new google.maps.Size(
marker_type[location.type].width,
marker_type[location.type].height
),
},
});
//google.maps.event.addListener(marker, 'click', function() {});
}
}
