Hi!
I want to control map zoom in skin, depending on what node I'm on. So the way I do it, is that in certain nodes I set a user data comment, so I know if I need to zoom in or zoom out. Then, when a node is changed, I zoom in, or out. Simple as that.
But I hit some snags.
First problem: When the tour starts, the map is zoomed. I've set the initial zoom to marker bounds, but it's zoomed. I've set the zoom to 0 or 1, it's zoomed out too much. At zoom 2 it's zoomed in too much. If I add marker bounds zoom to a button, it works (tough it's a little bit too zoomed out), but I couldn't find a way to make it work on tour start or opening the map.
Second problem: When I zoom, I cannot set the focus, because zooming the map is too slow. If I could add like a few seconds wait time before focusing, that would solve the problem. Or any other solution is welcome.
Third problem: I want to limit zooming out. Or even turn off zooming with mouse wheel would be great. I did not find a way to do so.
If anyone can help me with either, it would be appreciated.
Controlling map zoom in skin
- Hopki
- Gnome
- Posts: 13452
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
You can use a Node Marker set to a node.
Then give it the action Activate, Maps, Set Zoom, set the level and then set which Map Element.
Each node that needs to have a different zoom level will need its own node marker.
You can also use one node marker with many actions, using use tags, for example, the tag "zoom".
So one node marker can have,
Activate, Maps, Set Zoom... then have an action filter, tag = zoom, AND, node1
Activate, Maps, Set Zoom... then have an action filter, tag = zoom, AND, node3
Activate, Maps, Set Zoom... then have an action filter, tag = zoom, AND, node6
In the above nodes 1, 3 and 6 can have different zoom levels.
Regards,
You can use a Node Marker set to a node.
Then give it the action Activate, Maps, Set Zoom, set the level and then set which Map Element.
Each node that needs to have a different zoom level will need its own node marker.
You can also use one node marker with many actions, using use tags, for example, the tag "zoom".
So one node marker can have,
Activate, Maps, Set Zoom... then have an action filter, tag = zoom, AND, node1
Activate, Maps, Set Zoom... then have an action filter, tag = zoom, AND, node3
Activate, Maps, Set Zoom... then have an action filter, tag = zoom, AND, node6
In the above nodes 1, 3 and 6 can have different zoom levels.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Thank you, that part I already got. The problems I have are:
1) Initial zoom: Marker Bounds just doesn't work for me. The tour starts with the map zoomed in.
EDIT: I solved this by having one 'Simple Map', and a zoomable map, and changing the visibility when needed.
2) When I set the zoom on a map element, and then center node (or use center on node change setting on map), the centering just doesn't work, because it happens before the zoom is finished. If there is a way to center just a few seconds later, that would be great.
So for 2), I either want to make the center node action wait a few seconds, which I don't think is possible without overcomplicating the whole thing with a set of javascript code, or turn off mouse wheel zooming on the map element, so with 2 separate map elements it works without issue.
1) Initial zoom: Marker Bounds just doesn't work for me. The tour starts with the map zoomed in.
EDIT: I solved this by having one 'Simple Map', and a zoomable map, and changing the visibility when needed.
2) When I set the zoom on a map element, and then center node (or use center on node change setting on map), the centering just doesn't work, because it happens before the zoom is finished. If there is a way to center just a few seconds later, that would be great.
So for 2), I either want to make the center node action wait a few seconds, which I don't think is possible without overcomplicating the whole thing with a set of javascript code, or turn off mouse wheel zooming on the map element, so with 2 separate map elements it works without issue.
- Hopki
- Gnome
- Posts: 13452
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi tarsz,
We want to try and reproduce this but so far we can not.
Please see the attached project.
You will see the skin has two node markers, the first, Marker 1 node2, is when you go to node2 it centers the node in the map.
Then when leaving node2 it sets it back to zoom bounds.
The second node marker, Marker 2 node3, when you enter node3, it centres the node and then zooms in to level 23.
When leaving node3 it sets it back to zoom bounds.
This is all working.
Using the attached project please edit it to reproduce the issue you are reporting and list the steps to see the issue.
This will give us a project to work with.
If you can not see the issue with the text project, then maybe you have other actions that are conflicting in your skin.
Regards,
We want to try and reproduce this but so far we can not.
Please see the attached project.
You will see the skin has two node markers, the first, Marker 1 node2, is when you go to node2 it centers the node in the map.
Then when leaving node2 it sets it back to zoom bounds.
The second node marker, Marker 2 node3, when you enter node3, it centres the node and then zooms in to level 23.
When leaving node3 it sets it back to zoom bounds.
This is all working.
Using the attached project please edit it to reproduce the issue you are reporting and list the steps to see the issue.
This will give us a project to work with.
If you can not see the issue with the text project, then maybe you have other actions that are conflicting in your skin.
Regards,
- Attachments
-
- map_project.zip
- (56.16 KiB) Downloaded 185 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
I'll try centering before zooming, that might work. I'm using a floor plan, and some nodes are at the edges. So while in your project, using a map it works perfectly, this might behave differently on a floorplan, but I'm not sure.
I solved these problems somewhat since then, all seems to be ok now.
I solved these problems somewhat since then, all seems to be ok now.