yii2-google-maps-library
yii2-google-maps-library copied to clipboard
zoomControlOptions unusable
Hi!
I am trying to position the zoom controls to the bottom-left of the map with the following options set: $map = new Map( [ ... 'zoomControl' => true, 'zoomControlOptions' => [ 'position' => 'google.maps.ControlPosition.LEFT_BOTTOM', 'style' => 'google.maps.ZoomControlStyle.LARGE', ] ] );
Refering to google developers, the js part should look something like this: ... zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE, position: google.maps.ControlPosition.LEFT_BOTTOM }, ...
but in my case I get this: "zoomControlOptions":["google.maps.ControlPosition.LEFT_BOTTOM","google.maps.ZoomControlStyle.LARGE"]
Probably the proiblem is that the keys are not passed, only the values.
Can this problem be solved somehow?
Thanks, Norbert
Strange, mind sharing your code so I can test it and reproduce?
Hi here's my code!
I only need the +- icons on the left bottom, but it shows only on the default position (left top).
// Lets add a marker now
$marker = new Marker( [
'position' => $coord,
'title' => 'Quadrotex',
] );
// Add marker to the map
$map->addOverlay( $marker );
echo $map->display();
?>
Is true, there is an issue on the encode function. We are currently refactoring and testing all our extensions and I am sure this will be fixed.
I was about to tell you to use ZoomControlOptions but found an issue here: https://github.com/2amigos/yii2-google-maps-library/blob/master/controls/ZoomControlOptions.php#L61
Once I refactor LeafLet will jump into this library and fix this issue.
Thanks, please inform me when the update is available.
sure...
I'm having issue with this using zoomControlOptions too. Will this be fixed?
I am doing my best to support all our extensions @cluwong. Currently highly busy. Any help would be highly appreciated.