π§ Styling a Map
How to update from Smart Map to Google Maps
Follow the instructions below to learn how to update to the new Google Maps plugin...
Styling a map is now a much more flexible process. Here is a simple example in JavaScript...
// OLD
smartMap.styleMap('my-map', styleSet);
// NEW
googleMaps.getMap('my-map').styles(styleSet);
In addition, you can now apply the styles via JavaScript, Twig, or even PHP.
# Declare styles when creating the map
When creating a map object, you can inject a set of styles immediately.
const map = googleMaps.map(locations, {
'styles': styleSet
});
# Apply styles after map creation
If you have an existing map object, you can apply styles retroactively.
map.styles(styleSet);
New Documentation
See the complete new Styling a Map documentation.