yii2-google-maps-library icon indicating copy to clipboard operation
yii2-google-maps-library copied to clipboard

zoomControlOptions unusable

Open sajtosnorbert opened this issue 10 years ago • 7 comments

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

sajtosnorbert avatar Mar 25 '15 23:03 sajtosnorbert

Strange, mind sharing your code so I can test it and reproduce?

tonydspaniard avatar Mar 26 '15 02:03 tonydspaniard

Hi here's my code!

I only need the +- icons on the left bottom, but it shows only on the default position (left top).

46.255798, 'lng' => 20.116517 ] ); $map = new Map( [ 'center' => $coord, 'zoom' => 14, 'scrollwheel' => false, 'mapTypeControl' => false, 'width' => '100%', 'height' => '300', 'streetViewControl' => false, 'zoomControl' => true, 'zoomControlOptions' => [ 'position' => 'google.maps.ControlPosition.LEFT_BOTTOM', 'style' => 'google.maps.ZoomControlStyle.LARGE', ] ] );
// Lets add a marker now
$marker = new Marker( [
    'position' => $coord,
    'title'    => 'Quadrotex',
] );
// Add marker to the map
$map->addOverlay( $marker );

echo $map->display();
?>

sajtosnorbert avatar Mar 26 '15 06:03 sajtosnorbert

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.

tonydspaniard avatar Mar 26 '15 16:03 tonydspaniard

Thanks, please inform me when the update is available.

sajtosnorbert avatar Mar 26 '15 19:03 sajtosnorbert

sure...

tonydspaniard avatar Mar 26 '15 20:03 tonydspaniard

I'm having issue with this using zoomControlOptions too. Will this be fixed?

cluwong avatar Nov 10 '17 00:11 cluwong

I am doing my best to support all our extensions @cluwong. Currently highly busy. Any help would be highly appreciated.

tonydspaniard avatar Nov 12 '17 22:11 tonydspaniard