I’ve tried to edit the existing Map module’s styles to get another Map theme instead of the default one, but Divi doesn’t seem to offer that feature.
Example of the mentioned styles:
center: {
lat: 40.674,
lng: -73.945
},
zoom: 12,
styles: [{
"featureType": "all",
"elementType": "geometry",
"stylers": [{
"color": "#8754c4"
}]
}, {
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [{
"gamma": 0.01
}, {
"lightness": 20
}]
}, {
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [{
"saturation": -31
}, {
"lightness": -33
}, {
"weight": 2
}, {
"gamma": 0.8
}]
}, {
"featureType": "all",
"elementType": "labels.icon",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "administrative",
"elementType": "labels",
"stylers": [{
"color": "#ffffff"
}]
}, {
"featureType": "administrative",
"elementType": "labels.text.stroke",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "landscape",
"elementType": "geometry",
"stylers": [{
"lightness": 30
}, {
"saturation": 30
}]
}, {
"featureType": "landscape",
"elementType": "labels.text",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "landscape",
"elementType": "labels.text.stroke",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "poi",
"elementType": "all",
"stylers": [{
"visibility": "on"
}]
}, {
"featureType": "poi",
"elementType": "geometry",
"stylers": [{
"saturation": 20
}, {
"visibility": "on"
}]
}, {
"featureType": "poi",
"elementType": "geometry.fill",
"stylers": [{
"color": "#8945c7"
}]
}, {
"featureType": "poi",
"elementType": "geometry.stroke",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "poi",
"elementType": "labels",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [{
"lightness": 20
}, {
"saturation": -20
}]
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": [{
"lightness": 10
}, {
"saturation": -30
}]
}, {
"featureType": "road",
"elementType": "geometry.stroke",
"stylers": [{
"saturation": 25
}, {
"lightness": 25
}]
}, {
"featureType": "road",
"elementType": "labels",
"stylers": [{
"color": "#ffffff"
}]
}, {
"featureType": "road",
"elementType": "labels.text",
"stylers": [{
"color": "#ffffff"
}, {
"visibility": "on"
}]
}, {
"featureType": "road",
"elementType": "labels.text.fill",
"stylers": [{
"color": "#ffffff"
}]
}, {
"featureType": "road",
"elementType": "labels.text.stroke",
"stylers": [{
"visibility": "off"
}, {
"color": "#ff0000"
}]
}, {
"featureType": "transit",
"elementType": "labels",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "transit",
"elementType": "labels.text",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "transit",
"elementType": "labels.text.stroke",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "water",
"elementType": "all",
"stylers": [{
"lightness": -20
}]
}, {
"featureType": "water",
"elementType": "geometry",
"stylers": [{
"color": "#7950a9"
}]
}]
How would I go about applying these styles to the existing Map module? Is there an external plugin for this feature?
https://elegantmarketplace.com/downloads/divi-map-extended-module/
This paid module adds these features, but I’m wondering if there’s another way to go about it.
3
Answers
you can add your custom style in this file:
Line 2405, replace this:
with this:
You can try the plugin Snazzy Map for colormap in divi,its easy to handle
Plugin LINK
You can also visit the main site Snazzy map
If you use this plugin , then it dose not overwrite with theme update. Thanks
it dosent work to me so far, now that piece of code is in the 2499 line and looks like this:
and the style I’m trying to set up is this:
how should I do it?