Open jrswgtr opened 7 years ago
:+1: Share your code and will look to it with interest :)
Okay then I will. It can take a while because I am also really busy with work stuff.
The tree will look something like this:
mapstyles:
my_mapstyle:
- featureType: 'water'
elementType: 'all'
stylers:
- color: '#bbdefb'
- featureType: 'road'
stylers:
- visibility: 'off'
- featureType: 'administrative'
elementType: 'labels.text.fill'
stylers:
- color: '#ffffff'
- weight: 3
For static maps like this:
static_mapstyles:
my_static_mapstyle:
- feature: 'road'
visibility: 'off'
- feature: 'water'
color: '0xbbdefb'
- feature: 'administrative'
element: 'labels.text.fill'
color: '0xffffff'
weight: 3
These will result in ready-to-go arrays for google maps styles. I still have to write the configuration class with the treebuilder for validation.
I am currently working on a nice method to store custom mapstyles in Yaml files. This way you can make multiple configurations in a single or multiple files. Since the Symfony config component also takes XML files, they will be supported too.
If you are interested I can post it here when it is finished. Then you can take a look at it. If you like it you can consider using it.