This question is answered.


Permlink Replies: 28 - Pages: 2 [ Previous | 1 2 ] - Last Post: 23 Dec 25, 02:03 Last Post By: jeffkolker
JeffTucker

Posts: 8,041
Registered: 31-Jan-2006
Re: Map not remembering settings
Posted: 6 Dec 25, 19:10   in response to: gvmelle in response to: gvmelle
 
  Click to reply to this thread Reply
Also remember that if you have chosen to restrict the use of your API key to your own domain, it will not work when doing a local preview of the album.
JeffTucker

Posts: 8,041
Registered: 31-Jan-2006
Re: Map not remembering settings
Posted: 6 Dec 25, 22:50   in response to: gvmelle in response to: gvmelle
 
  Click to reply to this thread Reply
gvmelle wrote:
It is probably in jalbum itself....

Technically not possible. The jAlbum core doesn't produce a single line of HTML, CSS, or Javascript that actually constitutes the album (except for the rarely-used widget code). The skin does that. The jAlbum application doesn't contribute anything to the creation of a map frame. The only thing it does is store the API key string that you enter. Then it gives it to the skin when the skin asks for it.

In my test album, maps work in Photoblogger (and every other skin that offers map support). So the jAlbum core is storing it correctly, and there's nothing wrong with the skin coding, either.

I suggest you visit the Google map API console page, and confirm the status of your API key. Then copy it and paste it into the settings for your project.

https://console.developers.google.com/apis/credentials
JeffTucker

Posts: 8,041
Registered: 31-Jan-2006
Re: Map not remembering settings
Posted: 7 Dec 25, 00:42   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
BTW, one more wrinkle that often escapes people. Normally, in the Google site settings, you should restrict your API key to your own domain. That prevents someone else from swiping it and using it for his own site.

But if you move your content from a folder to a subdomain, like this:
https://example.com/myfotos/
 
to:
 
https://myfotos.example.com/
... your API key may not work, because the address doesn't match.

To cover all the bases, when entering the allowed URL's for your API key, you should enter:
example.com/*
*.example.com/*
MarkusD

Posts: 777
Registered: 13-Apr-2006
Re: Map not remembering settings
Posted: 15 Dec 25, 17:30   in response to: gvmelle in response to: gvmelle
 
  Click to reply to this thread Reply
There is no need for an API key to embedd Google maps.

Just look at that code:
<mapServer id="Google Standard" name="Google Maps Default Map" minZoom="2" maxZoom="21">
 <host>mt0.google.com</host>
 <host>mt1.google.com</host>
 <host>mt2.google.com</host>
 <host>mt3.google.com</host>
 <urlPattern>http://#{host}/vt/lyrs=m&amp;hl=#{language}&amp;x=#{tilex}&amp;y=#{tiley}&amp;z=#{zoom}</urlPattern>
 <copyright>Google</copyright>
</mapServer>


This code is from the file „mapservers.xml“ from GPSBabel.

I was able to embedd Google maps on my site without an API key.

Cheers, Markus
Laza

Posts: 1,403
Registered: 6-Sep-2005
Re: Map not remembering settings
Posted: 15 Dec 25, 18:29   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
That's interesting. If free, anonymous use is still allowed, why did they block the old API on millions of sites? That doesn't sound logical. Or they haven't yet discovered this loophole. (?)
MarkusD

Posts: 777
Registered: 13-Apr-2006
Re: Map not remembering settings
Posted: 15 Dec 25, 18:54   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
… That doesn't sound logical.
I agree.

Or they haven't yet discovered this loophole. (?)
Hard to believe. I think that GPSBabel is a tool used by a lot of people.
Laza

Posts: 1,403
Registered: 6-Sep-2005
Re: Map not remembering settings
Posted: 16 Dec 25, 06:43   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Anyway, this code alone does not work. You have to load a library or a new namespace somehow. All these elements are non-standard. And I can imagine, this creates a limited functionality map; just one tile, no interaction, no views.
MarkusD

Posts: 777
Registered: 13-Apr-2006
Re: Map not remembering settings
Posted: 16 Dec 25, 07:38   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
And I can imagine, this creates a limited functionality map; just one tile, no interaction, no views.
Look for your self. To me everything works like it should:

https://www.markus-drueck.de/public/2025%2011%2024%20Svalbard/2025%2011%2024%20Svalbard/2025%2011%2026%20Longyearbyen/index.html

Choose the map provider from the button in the upper right corner of the map.
Laza

Posts: 1,403
Registered: 6-Sep-2005
Re: Map not remembering settings
Posted: 16 Dec 25, 08:29   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
It's driven by the Leaflet library, but it seems Leaflet allows using Google Maps tiles too. Google may have only imposed limitations on its API access, but not on the tiles. Understandably, they wanted to limit the API usage first, which is used by the majority of the sites. I must admit, I don't want to go down this loophole unless Google Maps tiles can be easily added to the already-working OSM integration.
MarkusD

Posts: 777
Registered: 13-Apr-2006
Re: Map not remembering settings
Posted: 16 Dec 25, 08:36   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
... I must admit, I don't want to go down this loophole unless Google Maps tiles can be easily added to the already-working OSM integration.
That is fine for me!

It was more or less a hint for other users who might also be considering their own solution for integrating maps and at least know that other solutions exist.

Cheers, Markus
JeffTucker

Posts: 8,041
Registered: 31-Jan-2006
Re: Map not remembering settings
Posted: 17 Dec 25, 18:20   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
There's still a problem with the map showing on the index page when you don't want it to....

Photoblogger 7.2.0 is still ignoring Placement: No map on index page.
Laza

Posts: 1,403
Registered: 6-Sep-2005
Re: Map not remembering settings
Posted: 18 Dec 25, 10:58   in response to: JeffTucker in response to: JeffTucker
Correct
  Click to reply to this thread Reply
I forgot about this, but fixed it now in 7.2.1
gvmelle

Posts: 23
Registered: 29-Jan-2004
Re: Map not remembering settings
Posted: 20 Dec 25, 14:42   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Thanks
jeffkolker

Posts: 82
Registered: 27-Feb-2021
Re: Map not remembering settings
Posted: 23 Dec 25, 02:03   in response to: jeffkolker in response to: jeffkolker
 
  Click to reply to this thread Reply
Marked as answered since the latest updates fixed my problems.

Thanks!
Jeff
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums