Search found 96 matches

by stephenbillard
Thu May 08, 2025 6:46 pm
Forum: Requests and suggestions
Topic: Display number of images with GPS
Replies: 7
Views: 16017

Re: Display number of images with GPS

Just remove the albumid part of the WHERE clause and it will search the whole image table.

Code: Select all

$sql = 'SELECT count(*) FROM ' . prefix('images') . ' WHERE `gpslatitude` is not null and `gpslongitude` is not null';
$row = query_single_row($sql);
$count = reset($row);
by stephenbillard
Sun Apr 27, 2025 9:37 pm
Forum: Requests and suggestions
Topic: Display number of images with GPS
Replies: 7
Views: 16017

Re: Display number of images with GPS

The $album variable must be set to the object for the album you want to count. If this is for a normal album page then you can use the global variable $_current_album.
by stephenbillard
Thu Apr 24, 2025 5:13 pm
Forum: Requests and suggestions
Topic: Display number of images with GPS
Replies: 7
Views: 16017

Re: Display number of images with GPS

You could also use an SQL query to get the count:

Code: Select all

$sql = 'SELECT count(*) FROM ' . prefix('images') . ' WHERE `albumid`=' . $album->id . ' and `gpslatitude` is not null and `gpslongitude` is not null';
$row = query_single_row($sql);
$count = reset($row);
by stephenbillard
Thu Apr 24, 2025 4:25 pm
Forum: Requests and suggestions
Topic: Display number of images with GPS
Replies: 7
Views: 16017

Re: Display number of images with GPS

The following loop will find images in the album that have gps data: $count = 0; $images = $album->getImages(0, 0, null, null, false); $total_images = count($images); foreach ($images as $an_image) { $image = newImage($album, $an_image); $lat = (string) $image->getGPSLatitude(); $long = (string) $im...
by stephenbillard
Sun Apr 06, 2025 7:00 pm
Forum: Releases
Topic: netPhotoGraphics 2.01.04
Replies: 0
Views: 16313

netPhotoGraphics 2.01.04

This release implements the class-GPX image handler plugin based on the forum request https://forum.netphotographics.org/viewtopic.php?p=239#p239 The plugin will show a map with the route/track described in the GPS Exchange Format (.GPX) file. The plugin uses/requires the openStreetmap plugin to sho...
by stephenbillard
Sun Mar 09, 2025 1:05 am
Forum: Requests and suggestions
Topic: Display GPX routes on the map
Replies: 11
Views: 74631

Re: Display GPX routes on the map

I am going to create a ticket for this feature. Further discussions will be via https://github.com/netPhotoGraphics/net ... ssues/1608
by stephenbillard
Sat Mar 08, 2025 5:29 pm
Forum: Requests and suggestions
Topic: Display GPX routes on the map
Replies: 11
Views: 74631

Re: Display GPX routes on the map

Thanks for the GPX file. I will get this working with the code you have supplied. The implementation I propose will allow for as many routes as there are GPX files. Essentially the GPX file will be an image in the album. As for colors, I presume the color: 'blue' parameter would select it. So just a...
by stephenbillard
Thu Mar 06, 2025 11:20 pm
Forum: Requests and suggestions
Topic: Display GPX routes on the map
Replies: 11
Views: 74631

Re: Display GPX routes on the map

I guess I need a bit of education. How does one create a GPX file? Maybe you can provide me with an example. How does one tell Openstreetmap to create a route map as opposed to just individual points. Anyway, I think that the best approach is to create a "class-gpx" plugin that is based on...
by stephenbillard
Mon Feb 24, 2025 5:57 pm
Forum: Requests and suggestions
Topic: Display GPX routes on the map
Replies: 11
Views: 74631

Re: Display GPX routes on the map

Are you up to doing some work on this? Take a look at the "image" plugins for how these the getContents() method is the guts of displaying these alternate images, so the openStreetMap code would go there. classVIdeo and classTextobject are good starting points to see how this might be done...