Stylisation Google Maps
-
Hello everyone,
Personnaly I can’t customize my map on event-manager.
I putted these lines on the event-manager.js that I found on the Google Maps API documentation :var styledMapType = new google.maps.StyledMapType(
[
{elementType: “geometry”, stylers: [{“color”: “#212121”}] },
{elementType: “labels.icon”,stylers: [{ “visibility”: “off”}] },
{elementType: “labels.text.fill”,stylers: [{ “color”: “#757575”}] },
{elementType: “labels.text.stroke”,stylers: [{ “color”: “#212121”}] },
{
featureType: “administrative”,
elementType: “geometry”,
stylers: [{ “color”: “#757575”}]
},
{
featureType: “administrative.country”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#9e9e9e”}]
},
{
featureType: “administrative.land_parcel”,
stylers: [{ “visibility”: “off”}] },
{
featureType: “administrative.locality”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#bdbdbd”}]
},
{
featureType: “poi”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#757575”}]
},
{
featureType: “poi.park”,
elementType: “geometry”,
stylers: [{ “color”: “#181818”}]
},
{
featureType: “poi.park”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#616161”}]
},
{
featureType: “poi.park”,
elementType: “labels.text.stroke”,
stylers: [{ “color”: “#1b1b1b”}]
},
{
featureType: “road”,
elementType: “geometry.fill”,
stylers: [{ “color”: “#2c2c2c”}]
},
{
featureType: “road”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#8a8a8a”}]
},
{
featureType: “road.arterial”,
elementType: “geometry”,
stylers: [{ “color”: “#373737”}]
},
{
featureType: “road.highway”,
elementType: “geometry”,
stylers: [{ “color”: “#3c3c3c”}]
},
{
featureType: “road.highway.controlled_access”,
elementType: “geometry”,
stylers: [{ “color”: “#4e4e4e”}]
},
{
featureType: “road.local”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#616161”}]
},
{
featureType: “transit”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#757575”}]
},
{
featureType: “water”,
elementType: “geometry”,
stylers: [{ “color”: “#000000”}]
},
{
featureType: “water”,
elementType: “labels.text.fill”,
stylers: [{ “color”: “#3d3d3d”}]
}
],
{name: ‘Styled Map’});
var map = new google.maps.Map( document.getElementById(’em-map’), {
zoom: 14,
center: em_LatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControlOptions: {
mapTypeIds: [ google.maps.MapTypeId.ROADMAP, ‘styled_map’]
},
mapTypeControl: false
});
map.mapTypes.set(‘styled_map’, styledMapType);
map.setMapTypeId(‘styled_map’);But the map is still the same with the classic skin, instead of being on the Dark Skin.
Anyone can help ?
(I replaced event-manager.js and event-manager.min.js on the FTP)
Thank you all
- The topic ‘Stylisation Google Maps’ is closed to new replies.