michael kenny
Posts: 0
Joined: Tue Apr 02, 2013 2:47 pm

Changing zoom property on a googlemap component

i am using a google map component in my app and its working fine. but i wanted to hide the map and get it to appear when i click a button. The hide works fine. using the on click change property visible the map reappears but the zoom is wrong. i tried to add another on click change property event but cannot specify a value for zoom. tried a number 14, tried a string '14' tried a local variable but when i click the button i get invalid value.

is there a format to specify the zoom or am i missing something else?

thanks in advance

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Changing zoom property on a googlemap component

Hello Michael!

Multiple Event http://docs.appery.io/documentation/a... may cause it.
Testing it, I'll update.

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Changing zoom property on a googlemap component

(The solution is to use service callback events to invoke the next service - url not found: http://docs.appery.io/documentation/a...)

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Changing zoom property on a googlemap component

Thanks Dale. We're already aware. Will retrieve it soon.

michael kenny
Posts: 0
Joined: Tue Apr 02, 2013 2:47 pm

Changing zoom property on a googlemap component

Just to reiterate. The map is working fine, when i just display it on page show. I wanted the map hidden and then visible on the click of a button. used the click set property event on the button and got the visible to work fine. However it was not zoomed in (after it becoame visible) as it was before i hid it. I tried the set property event for the zoom property but get this error
Uncaught Error: Invalid value for property < zoom : 10

what i need to be able to do is change the zoom on the map that i just made visible.

hope this is clear.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Changing zoom property on a googlemap component

You can use Google Map API to control the zoom .

michael kenny
Posts: 0
Joined: Tue Apr 02, 2013 2:47 pm

Changing zoom property on a googlemap component

but. if i don't hide the map it has the desired zoom setting from my creation. the problem arises when i hide the map and then show it using the click set property event. - i am trying to change the zoom to fix the problem that has arisen from making the map not visible.
i am using the property zoom from the drop down menu for the property on the click event. if the hide/show did not change my map i would not need to do this.
maybe the problem is with the hide and show but i would have thought that making it visible or not visible would not change the other properties properties.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Changing zoom property on a googlemap component

I'm not sure why the zoom changes. To what zoom does it default? Try setting the zoom in your code and the refreshing the map.

michael kenny
Posts: 0
Joined: Tue Apr 02, 2013 2:47 pm

Changing zoom property on a googlemap component

moved the map to a new page and used a button to get there. it works fine now

Return to “Issues”