Hey, vincent, it works! But...
The settings:
words=*&searchfields=exifgpslatitude,exifgpslongitude&inalbums=0&inimages=1&unpublished=0
[code]
[/code]
I use the theme basic. The problem is: All thumbs are displayed above the map. This also delays the page load time. How can I prevent the thumbs from being displayed?
@acrylian, yes, only ~ 15.000 thumbs had to be created. Here is the on-the-fly not so good. After all thumbs had been created, loading the index.php now takes 15 seconds.
You don't need to use makeAlbumCurrent. You already pass the album object ot hte printOpenStreetMap() function directly.
The problem is: All thumbs are displayed above the map. This also delays the page load time. How can I prevent the thumbs from being displayed?
Create your own specific album layout using the multiple_layouts plugin. Or add a check to the existing album.php theme page to disable thumbs for this specific album.
my tips is to create a map in a page.
basic doesn't support zenpage plugin, so it isn't the rigth way.
where do you add your code? in album.php page?
do you want to have a map only for this dynamic album or for all albums with geotaggued pictures?
in case of you want to have a map only for this dynamic album:
-duplicate album.php (album.php and album_map.php)
-in album.php: remove all code with openstreetmap plugin
-in album_map.php: only add (wherever you want in your code) this code printOpenStreetMap().
for example, you may remove all code to display subalbums and pictures and then you will have only your map)
-in admin>plugin: enable multiple_layouts plugin and check that multiple layouts is enabled for 'album'
-in admin>albums>your_dynamic_album, choose album_map as album layout.
just tested OK with googlemap plugin, but it should be something very similar with zp_OpenStreetMap.
Ok, that works better with album_map.php and multiple_layouts. So I have that in my gallery3.
I do not really need it for every parent album and subalbum.
Now I have some questions.
1.) This dynamic album should not appear in the index page. How can I hide it? I just want to insert a link to this page in the header.
2.) How can I remove the title and description in the popups? I just want to show the thumbs with image page link.
3.) Can I now disable Latitude and Longitude in search settings? That should not be generally available.
There is a big problem with using the search for the map. The result is Double Content/Duplicate Content, which Google punishes with down-ranking. The links in the popups and the page URLs have the following structure: example.com/fotomap/PICT0001.JPG
This is very bad.
Info: https://support.google.com/webmasters/answer/66359?hl=en
What can you do there?
1.) This dynamic album should not appear in the index page. How can I hide it? I just want to insert a link to this page in the header.
Unpublish it.
2.) How can I remove the title and description in the popups? I just want to show the thumbs with image page link.
If you mean the plugin, you have to modify it. As said extend the class via plugin or theme functions to create your own custom version without modifiying the plugin.
3.) Can I now disable Latitude and Longitude in search settings? That should not be generally available.
Those are options. Look at the general functions getOption and setOption. You can set them temporarily.
The result is Double Content/Duplicate Content, which Google punishes with down-ranking.
Besides taht Google is a bit more clever than in the past. Use the html_meta_tags plugin and enable the canonical url option.
Many thanks for answers.
I have make a Fork of the plugin and have expand it.
Pull request: https://github.com/acrylian/zp_openstreetmap/pull/12
The plugin html_meta_tags with canonical does not work that way.
http://forum.zenphoto.org/discussion/1410005/plugin-html-meta-tags-canonical-url/
I would prefer it, if search results are not displayed as independent albums, but are always linked to the image in the correct album. Do you have a hint for me, how can I realize that?
There is nowhere the correct URL to the image pages deposited.
It can be used the "webpath" with preg_replace, but it is not correct either.
Here is a solution for the zp_openstreetmap plugin.
zp_openstreetmap.php
Original:
[code]$thumb = "";[/code]
Hack:
[code]$thumb = "webpath) . "'>";[/code]
Consider that otherwise the thumbs in the maps popups are linked to an album, where all images of the entire gallery are listed.
Stop! These links also link to an album in which all images of the entire gallery are listed.
I have no solution ...
If you are within a dynamicalbum the image pages have the url of that dynamic album. Otherwise it is complicated and confusing, to stay in album context and for visitors if the url constantly changes. That's why there is the canonical url option of the html meta tags plugin…
preg_replace('/^\/albums/', "", $image->webpath) . "
Don't understand this. This is an image page url that is not supposed to include the albums folder.
If you don't want that you need to return to the original more complicated solution.
Images in search results are always dynamic albums. But albums in search results link to the original, there is nothing dynamic.
I know that with the independent (dynamic) albums and it has its advantages. And dynamic albums are independent of what I want.
I'm just looking for a way to break this process. Currently, the maps are in a dynamic page that consists of a search result. In search results albums are linked autonomous. How can I achieve this with images in search results?
Which original more complicated solution?
The maps directly in the startpage is bad because the page has too long load times (20 seconds and more).
Which original more complicated solution?
The one via thet object model we discussed before Vincent suggested using an dynamic album.
But albums in search results link to the original, there is nothing dynamic.
Yes, search results and dynamic albums are not exactly the same and not meant to. Search results link to the original place. All else would be rather confusing.
Flourish!
Please visit my excellent solution:
https://github.com/mebels/zenphoto-osm-fotomap
Oh no, do not just look, try it right now!
Any questions?
do you think this solution is more quick/effiscient than dynamic album solution?
But, the thumbs in the popups link directly to the original image pages in the original albums. That's what I wanted.
It would be possible with a dynamic album as well but would require some more coding and modification to the OSM plugin. So this is probably the best solution for you.
Btw, I have added this and the Gallery3 migration to our site's extensions section.
I do not know and I have not tested it, if my code in a dynamic album again would not link to the original image pages. I do not know enough about how it works, but it seems that way. Linking images (not albums) from a dynamic album is probably always like this.
An another nice gimmick for the waiting to load the page by tousand of photos:
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_progressbar_3
I have modified it to 30 seconds load. (a fake load progress bar. better than nothing)
Btw, I have added this and the Gallery3 migration to our site's extensions section.
wow! thanks.