-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Photos on the map #4 #21
Conversation
Hi Toghether I was not able to get your branch running. |
@tacruc |
@BatPio Should you allready see Pictures on the map? Because I can see non. |
@tacruc |
@BatPio Thanks for the hint, that's what I was missing. App is now running without any problems and errors. One suggestions. The Pictures open, when click on looks small to me, maybe you could make this window bigger, or add the possibility to open a preview when clicking on the enlarged image? |
Sorry for that. Wanted to test this branch a couple of days ago, but had no pictures at hand. Will look around for a couple of geo-referenced pictures and merge the PR. |
Found a picture with gps data! :) |
I don't know why it don't work. Do you have enabled jpeg previews? Preview in files app is visible? Please attach screen with error. You can also try with my photos https://drive.google.com/file/d/0ByQ1JbfMQmtAdEVaa185TE5ESHM/view?usp=sharing PS. |
Preview should be enabled by default, but I enabled it and added all image related preview providers. Thumbnail is visible in the files and gallery app. There is no error, just the 404 I get from |
Please can you write what is the URL to thumbnail in files app? If it work in files app, it must be different than in my java script. What version of Nextcloud are you using? I have 12.0.2 |
js/photosController.js
Outdated
|
||
/* Preview size 32x32 is used in files view, so it sould be generated */ | ||
generateThumbnailUrl: function (filename) { | ||
return "/index.php/core/preview.png?file=" + encodeURI(filename) + "&x=32&y=32"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returning /index.php/...
doesn't work if nextcloud isn't installed in the root dir. You can use OC.generateUrl('')
to generate the base url or pass a path as parameter (OC.generateUrl('apps/maps/...')
).
This fixed it for me:
return OC.generateUrl('core') + "/preview.png?file=" + encodeURI(filename) + "&x=32&y=32";
js/photosController.js
Outdated
|
||
/* Preview size 375x211 is used in files details view */ | ||
generatePreviewUrl: function (filename) { | ||
return "/index.php/core/preview.png?file=" + encodeURI(filename) + "&x=375&y=211&a=1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
return OC.generateUrl('core') + "/preview.png?file=" + encodeURI(filename) + "&x=375&y=211&a=1";
js/photosController.js
Outdated
}, | ||
|
||
getImageIconUrl: function() { | ||
return "/index.php/apps/theming/img/core/filetypes/image.svg?v=2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return OC.generateUrl('/apps/theming/img/core/filetypes') + "/image.svg?v=2";
Good point. Didn't think about the obvious solution...Looking at the files app I saw the problem. You append |
Thanks for fixes. I added them to my code :D |
I think we can ignore the failed travis check, since it is related to Edit: If you agree you can merge it :) |
That's great! Merged :) |
Backend:
UI: