Piwigo / piwigo-openstreetmap

OpenStreetMap integration for Piwigo
http://piwigo.org/ext/extension_view.php?eid=701
GNU General Public License v3.0
35 stars 35 forks source link

Separate geoJSON from Categories HTML page #51

Closed LeOSW42 closed 9 years ago

LeOSW42 commented 9 years ago

Hello,

Is that possible to separate the geoJSON in a separate file ? Once did, I hope to pass the geoJSON file URL to gpsies for example to display markers on their embedded maps.

Léo

xbgmsharp commented 9 years ago

I don't understand what you want. Please be more specific regarding your feature request. There is geoJSON data, only GPX file which are in XML format and not JSON format.

LeOSW42 commented 9 years ago

Ok, when I enable Map on Categories, the source code of the page contain the list of the points (images) in the category, in geoJSON :

var addressPoints = [[42.89805,-0.71657,"DSCN1894.JPG","http://leo.lstronic.com/piwigo/i.php?/upload/2014/08/10/20140810124603-910b2ae6-sq.jpg","http://leo.lstronic.com/piwigo/picture.php?/177/category","","",4608],[42.89773,-0.71747,"DSCN1895.JPG","http://leo.lstronic.com/piwigo/i.php?/upload/2014/08/10/20140810124638-8e17affb-sq.jpg","http://leo.lstronic.com/piwigo/picture.php?/178/category","","",4608]];

It could be great to have that variable externaly (separate file), because I want to use this feed in external maps.

Léo

xbgmsharp commented 9 years ago

You can easily make your own. The code to generate JSON data from the database is available here. https://github.com/xbgmsharp/piwigo-openstreetmap/blob/master/include/functions_map.php#L99

I don't see the point to make it as webservice so far, but it can change.

LeOSW42 commented 9 years ago

Ok I did what I wanted !

Here is an example : http://leo.lstronic.com/piwigo/index.php?/category/9

Léo

xbgmsharp commented 9 years ago

Looks very nice Would like to commit your code so other can use it.

LeOSW42 commented 9 years ago

Here it is :

https://github.com/LeOSW42/PiwigoImagesAndGPX

Léo