Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add style options for marker cluster #4

Open
iiirxs opened this issue Sep 22, 2017 · 0 comments
Open

Add style options for marker cluster #4

iiirxs opened this issue Sep 22, 2017 · 0 comments

Comments

@iiirxs
Copy link

iiirxs commented Sep 22, 2017

Currently it's impossible to define in config.yml some styles for a marker cluster. The getConfigTreeBuilder() inside Ivory\GoogleMapBundle\DependencyInjection\Configuration.php expects only scalar values for marker_cluster options:

->arrayNode('options')
->useAttributeAsKey('options')
->prototype('scalar')->end()
->end()

In order to enable this functionality of defining styles for marker clusters we have to change the existent code to this one:

->arrayNode('options')
->children()
->scalarNode('gridSize')->end()
->scalarNode('maxZoom')->end()
->scalarNode('zoomOnClick')->end()
->scalarNode('averageCenter')->end()
->scalarNode('minimumClusterSize')->end()
->arrayNode('styles')
->prototype('array')
->children()
->scalarNode('url')->end()
->scalarNode('height')->end()
->scalarNode('width')->end()
->scalarNode('anchor')->end()
->scalarNode('textColor')->end()
->scalarNode('textSize')->end()
->scalarNode('backgroundPosition')->end()
->scalarNode('iconAnchor')->end()
->end()
->end()
->end()
->end()
->end()

The above code provides all options currently available by Google Maps Api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant