Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Buttons to zoom in and out of google map instead of slider

Hi

Can we have Buttons to zoom in and out of google map instead of slider? How can this be done?

Regards

Raj

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This will work:


sub ZoomIn
set z=ActiveDocument.Variables("var_zoom")
z.SetContent z.GetContent.string-1, true
end sub
sub ZoomOut
set z=ActiveDocument.Variables("var_zoom")
z.SetContent z.GetContent.string+1, true
end sub

I don't consider here any conditions, just the basics.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Raj,
It definitely can be done.
Slider, if it is based on a variable, modifies the value of a variable. This can be done with buttons as well - "zoom out" runs a macro that adds 1 to a variable value, "zoom in" subtracts 1. Should be rather simple. Probably you want to set some limits for both changes, for example don't allow to go up above 15, and disable "zoom out" button conditionally, and don't allow to go below 2 by disabling "zoom in" button.

Not applicable
Author

Hi Michael,

Thank you. But I have no experience with macros, so is it possible for you to provide me with the vb script.

just the idea of how to assign:

var_zoom=var_zoom + 1

Regards

Raj

Anonymous
Not applicable
Author

This will work:


sub ZoomIn
set z=ActiveDocument.Variables("var_zoom")
z.SetContent z.GetContent.string-1, true
end sub
sub ZoomOut
set z=ActiveDocument.Variables("var_zoom")
z.SetContent z.GetContent.string+1, true
end sub

I don't consider here any conditions, just the basics.

Not applicable
Author

Thanks a lot Michael. Big Smile

One last thing, do you have a document (tutorial) on vb scripts, where it talks about 'getcontent.string','setcontent' etc.

Thanks & Regards

Raj

Anonymous
Not applicable
Author

APIGuide.qvw Big Smile

Anonymous
Not applicable
Author

Hi Arun/ Michael,

I am designr and started learning development part. I dont understand te post here. Pls explain me the step by step process to achive this. Apart from this button idea do we have any other idea for zoom in google map. Can you guys pls send me the sample qvw of this?

Rgds,

Nandha