Skip to content

Add kml-support#72

Open
ThomasDaheim wants to merge 13 commits intoPiwigo:masterfrom
ThomasDaheim:master
Open

Add kml-support#72
ThomasDaheim wants to merge 13 commits intoPiwigo:masterfrom
ThomasDaheim:master

Conversation

@ThomasDaheim
Copy link
Contributor

Probably, gpx.inc.php should be renamed as well...

Probably, gpx.inc.php should be renamed as well...
@xbgmsharp
Copy link
Collaborator

Could you avoid the cloudfare call? Why is it need?
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js" charset="utf-8"></script>

Maybe we should use a different Leaflet plugin:
https://github.com/makinacorpus/Leaflet.FileLayer
https://github.com/mapbox/leaflet-omnivore

The first array_push should be array_push($conf['file_ext'], 'gpx', 'kml');
http://php.net/manual/en/function.array-push.php

Could you provide a sample KML file link that I could download so I could test.

@ThomasDaheim
Copy link
Contributor Author

I have simply taken the kml.js that I could find. Whatever works is fine with me :-)

Fine to change the array_push - as I said, I don't really speak php

@ThomasDaheim
Copy link
Contributor Author

BTW, I have noticed that for kml the start and end markers can't be set. Have removed that.

In addition, I don't think that kml has info for a profile. But I didn't dared to remove that from the template...

@xbgmsharp
Copy link
Collaborator

it won't work

    if ( (array_key_exists('path', @$picture['current']))
        && (strpos($picture['current']['path'],".gpx") === false
        && strpos($picture['current']['path'],".kml") === false))

Should be

    if ( (array_key_exists('path', @$picture['current']))
        && (strpos($picture['current']['path'],".gpx") === false
        || strpos($picture['current']['path'],".kml") === false) )

As in If path and (GPX or KML)

@xbgmsharp
Copy link
Collaborator

Where is kml.js coming from?
Please add an header so we know the author and the license.

@ThomasDaheim
Copy link
Contributor Author

Code above works here without issues :-)

My reading was: "return if path and (not gpx and not kml)" since your checking whether picture path & file contains ".gpx" or ".kml" extension. With your code you would return if either gpx or kml - thats not what we want, right?

Following options included:

- hide gpx of sub-categories
- show only first image of sub-categories

Additional changes:

- add option to specify link target of popup
- Bugfix for outdated map provider links
# Conflicts:
#	include/functions_map.php
@patmans
Copy link

patmans commented Jun 10, 2018

What is the status of this? I was trying to get lots of gpx files working again.

- removed smarty parameter
# Conflicts:
#	CHANGELOG
#	admin/admin_config.php
#	admin/admin_config.tpl
#	category.inc.php
#	include/functions_map.php
#	language/br_FR/plugin.lang.php
#	language/nl_NL/plugin.lang.php
#	language/pl_PL/plugin.lang.php
#	main.inc.php
#	maintain.inc.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants