starting Google Maps in non-satellite view

Q&A about the latest versions
Exposición
Posts: 78
Joined: Thu Jul 26, 2012 2:08 pm

hi,
i have created a google map in html5 output like described in the tutorial. the map starts in satellite view. is there a way to start the map in the ordinary map mode (non satellite view), so that the user don't have to switch to normal mode manually?
User avatar
Hopki
Gnome
Posts: 13024
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

HI,
Yep you can change the default. It's in the HTML page and you need to find and change this line:

Code: Select all

mapTypeId: google.maps.MapTypeId.HYBRID
You then have the options:

ROADMAP
SATELLITE
HYBRID
TERRAIN

So for example to change the default to terrain you would change the line to:

Code: Select all

mapTypeId: google.maps.MapTypeId.TERRAIN
Remember as soon as you republish the HTML page this will get over written.
Regards,
Hopki
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/
Exposición
Posts: 78
Joined: Thu Jul 26, 2012 2:08 pm

Cool, thanks!
frodo
Posts: 224
Joined: Wed Oct 15, 2008 2:52 pm

Hi, Hopki!
Great! It just came right to help me out with the tests I,m doing on a tour.
Is there a way to change the initial position of the map?. I mean the initial zoom and also the position of the map so that the "hotspots" are in the center of the frame when opening.
Thanks!
Regards, Martin
User avatar
Hopki
Gnome
Posts: 13024
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Martin,
Not really played with this as what your asking it sort of does as default?
The map opens with all the locations in view, so centring all the nodes.

Can you do a screen shot and highlight what you mean to give me a better understanding for what it is our after?
Regards,
Hopki
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/
frodo
Posts: 224
Joined: Wed Oct 15, 2008 2:52 pm

Hi, Hopki!
Yes the map opens certainly with all the nodes centered, but in case one need it zoomed out a little more, is that possible?
This is the default zoom:
Image

But just as an example I would prefer this initial position of the zoom:
Image

BTW, is there a way to move the map automatically to have the active node in the center or center the map when clicking on a hotspot in the panorama?
Thanks for your help.

Regards, Martin
User avatar
Hopki
Gnome
Posts: 13024
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Martin,
This can be set manually but you need to remove some code and change a value.
First remove this code:

Code: Select all

}
		if (!bounds.isEmpty()) {
			map.fitBounds(bounds);
This is found at the bottom or the page, make sure you remove all the brackets or you may get an error.

Now your looking for:

Code: Select all

var mapOptions = {
			zoom: 14,
			center: activeNodeLatLng,
			mapTypeId: google.maps.MapTypeId.HYBRID
The value zoom: 14, is what you adjust.
0 = zoom out max
19 = zoom in max

Regards,
Hopki with a little help from Christoph :wink:
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/
frodo
Posts: 224
Joined: Wed Oct 15, 2008 2:52 pm

Thanks to both then :D .
Regards, Martin
Alain
Posts: 46
Joined: Tue Apr 02, 2013 12:08 pm

How can I set this view as default ?
Zuschneiden.jpg
Zuschneiden.jpg (65.56 KiB) Viewed 12122 times
At the moment I get this view as default (btw: how do you call this view ?):
Zuschneiden2.jpg
Zuschneiden2.jpg (69.56 KiB) Viewed 12122 times
Kind regards
Alain
User avatar
ArkiTonio
Posts: 96
Joined: Mon Apr 20, 2015 10:32 am
Location: Ascoli Piceno, Italy

Hi Alain,
look at this:
viewtopic.php?t=11121#p45515
ArkiTonio
User avatar
Hopki
Gnome
Posts: 13024
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Guys,
For now you can only effect the Zoom by modifying the skin.js file.
In V6 out later you can set zoom and if your want the 45 degrees tilt fro the Map elements properties.
Regards,
Hopki
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
ArkiTonio
Posts: 96
Joined: Mon Apr 20, 2015 10:32 am
Location: Ascoli Piceno, Italy

That's good news, Martin.
:)
ArkiTonio
MGreen
Posts: 61
Joined: Thu Nov 26, 2015 12:24 pm

Satellite Map - Disable 45deg view - check box ticked - yet 45deg view still happening

Hi all - has anyone else encountered this matter? cheers, Matt
User avatar
k.ary.n
Gnome
Posts: 615
Joined: Wed Aug 15, 2007 1:02 pm

MGreen wrote: Thu Jul 14, 2022 11:57 pm Satellite Map - Disable 45deg view - check box ticked - yet 45deg view still happening

Hi all - has anyone else encountered this matter? cheers, Matt
I've just tested this and it seems to be working. If "Disable 45º View" is selected, then when you zoom in, then the map doesn't switch to the 45º view. Only if you manually click the map control to turn it on.
MGreen
Posts: 61
Joined: Thu Nov 26, 2015 12:24 pm

Hi k.ary n,
Thanks for checking on this.
Can you please look at digitaldarwin.au.... see the map select button top centre. When that is selected, the map appears at 45 deg.
Is this use case like the "manually click the map control" that you mention?
Although it's nice and workable as it is, the map will be more readable if it's not at 45 degrees.
Thanks, Matt
Post Reply