Map Element configuration

Q&A about the latest versions
Post Reply
User avatar
FLangmann
Posts: 8
Joined: Thu Aug 15, 2019 5:06 pm

Guys, I need a hint!
I am testing out the skin editor. (6.16 pro-PC) My goal is to create a map where the zoom-buttons are in the upper right corner, and a radar with a bearing-line just like in the tour editor is displayed.
(Standard Map: Worldmap, API: Leaflet)
Any suggestions are very welcome :)

Cheers,
Frank

(Examples attached)

Tour Editor:
Tour Editor.jpg
Tour Editor.jpg (221.3 KiB) Viewed 1996 times
Current:
Map Element _1.jpg
Map Element _1.jpg (310.55 KiB) Viewed 1996 times
Goal:
Map Element _2.jpg
Map Element _2.jpg (314.18 KiB) Viewed 1996 times
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Frank,
Check out the webinar videos on maps and floor plans.
https://ggnome.com/webinars/
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/
User avatar
FLangmann
Posts: 8
Joined: Thu Aug 15, 2019 5:06 pm

A personal word:
Thanks Martin, I‘ve seen, and scanned most of the Pano2vr tutorials and I’ve read a lot in the documentation.
And I am quite sure, there is now concrete answer to my pretty basic goals. If I am wrong, I would pay you the next drink ;)
Don’t misunderstand me, this forum is helpful and informative, and you Garden Gnomes are doing a great job with all the software keeping and gardening, and with all your responsive support you are giving with tutorials and screen casts etc. So thank you very much all of you!!!
Of course, with all its complexity we can’t expect every question here could be answered in depth.
So the best answers are those taken out by the questioner... :D

Personally I am not a big fan of Google Maps and it´s API model, so my focus will be to work with independent map projects like OSM and Leaflet.
So here is my workflow and explanation for beginners to modify the zoombox position:

1.) Connecting a panorama with the Worldmap in the Tour Map as Map1:
Unbenannt-2.jpg
Unbenannt-2.jpg (28.07 KiB) Viewed 1918 times

2.) importing a map element in the skin editor:
Map.jpg
Map.jpg (90.52 KiB) Viewed 1918 times

3.) After generating the output container you will find a subfolder infrastructure below the output folder: \3rdparty\leaflet
Here you will find the p2vr-generated leaflet map codes with Javascript and ccs

4.) Edit the leaflet.css file as follows:
Below line 116 (/* control positioning */) insert this codeline:
.leaflet-control-container .leaflet-top.leaflet-left { position: absolute; left: auto; right: 10px; }
to place the zoom box in the right corner of the displayed map
leaflet.css-code.jpg
leaflet.css-code.jpg (137.29 KiB) Viewed 1918 times

Keep in mind, every new generated output container will overwrite the modified leaflet.css

Further good information sources you will find under:
https://leafletjs.com/
https://stackoverflow.com/questions/336 ... n/33621034

I am sure, I will find part 1 of my question sooner or later...

Cheers >Frank<
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Frank,
With regards to the zoom buttons, why not add your own?
This way you can then position them wherever you want.
You can even change the colours, font style all sorts even make it react to different nodes using tags.

map.gif
map.gif (3.45 MiB) Viewed 1855 times

Working project attached.
The map element must be set to Z-Index 0 with default deselected.
You could select the map and make it a component, easy to add to any project then.
With regards to the line in the radar beam, I'll add a feature request.
Regards,
Attachments
map.zip
(24.31 KiB) Downloaded 123 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/
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Hopki,

Is there a way to detect when you are at max zoom in/out so you could change the alpha of the button when it reaches that point?

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
FLangmann
Posts: 8
Joined: Thu Aug 15, 2019 5:06 pm

Martin, that brings me a good piece further! I thought the map element was only to modify in certain aspects by the Google or Leaflet API. In terms of coding I am not experienced. So any example of how to realize an idea is pretty helpful. So thank you again for your efforts to bring knowledge to the brain(s) ;)

Cheers
Frank
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

@Tony,
We can not detect the level in the skin, but there is a request in for this already.
Cheers mate,
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/
Post Reply