Move Controls on Map

Permalink Browser Info Environment
Hi,

I'm really pleased with the add-on its great! Just wondering if you could help point me in right direction to move the zoom and pan controls from the top left to the bottom right?

Many Thanks

Stuart

Type: Discussion
Status: New
stuarth123
View Replies:
ScottC replied on at Permalink Reply
ScottC
Hello Stuart,

This is a bit tricky. There isn't an option for it (yet). I have however added this to my trello board as a feature update, i'm right in the middle of getting my new demo site up, pushing up a new marketplace item then I am moving back to handling a few feature requests before i write another add-on.

If you have access to your site via ftp, you will want to edit this file:

packages/scottc_page_mapper/elements/map_public.php

right around line 31, where it says zoom: <?php echo $zoom; ?>,

add:
panControl: true,
panControlOptions: {
position: google.maps.ControlPosition.BOTTOM_RIGHT
},
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL,
position: google.maps.ControlPosition.BOTTOM_RIGHT
},


make sure you get that comma in there after the zoom control options, the next line would be

center: myLatlng

I'll add this as a block option though this totally makes sense.

If you have problems with this just email me your ftp details and I can play around with it.

I am following this:

https://developers.google.com/maps/documentation/javascript/controls...


Please let me know. I am glad you like the add-on, I am extremely pleased with the way it turned out :)

-Scott
stuarth123 replied on at Permalink Reply
stuarth123
Hi Scott,

Great, thanks so much for your help, works a treat.

All the Best,

Stuart

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.