This object is in archive! 
Open local html file from link in popup
Completed
I have created mbtiles maps. When clicking on the map a popup is shown with a link to a html pages. For now this links to an online html page, but I would like to create links to html files on the device.
Suppose I have the file in a sub-folder 'docs' in the Locus/maps folder. I then tried to use a link like <a href="">mylink</a>, but I get the error "Unable to find application to perform this action"
Any idea how to do this?
Good day Paulo,
I've changed your "question" to "idea". Because I think this won't work automatically, but it will need some changes in Locus. May you prepare for me some sample map + html files, I may use for testing? Cannot promise it will work, but i should at least try it ...
Good day Paulo,
I've changed your "question" to "idea". Because I think this won't work automatically, but it will need some changes in Locus. May you prepare for me some sample map + html files, I may use for testing? Cannot promise it will work, but i should at least try it ...
Hi Menion
Thanks for looking into this. Attached a zip file with mbtiles map. Clicking on the map will open a popup with a link. This link is of the form <a href="file:///docs/A.html">link</a>. The A.html and other html files to which the map links are in the folder docs that is also included in the zip file. Hope this makes sense
Paulo
Hi Menion
Thanks for looking into this. Attached a zip file with mbtiles map. Clicking on the map will open a popup with a link. This link is of the form <a href="file:///docs/A.html">link</a>. The A.html and other html files to which the map links are in the folder docs that is also included in the zip file. Hope this makes sense
Paulo
By the way, my question seems somewhat similar to this one? http://help.locusmap.eu/topic/how-to-open-a-link-in-a-browser. Although in that case is is about links in gpx files.
Forget the remark, this is about external web links.. not offline html pages
By the way, my question seems somewhat similar to this one? http://help.locusmap.eu/topic/how-to-open-a-link-in-a-browser. Although in that case is is about links in gpx files.
Forget the remark, this is about external web links.. not offline html pages
it works (see clip)
but it can't be exported.
example.
- copy your (eg) test.htm to ../Locus/data/import/
- create point
- open/edit POI description:
it works (see clip)
but it can't be exported.
example.
- copy your (eg) test.htm to ../Locus/data/import/
- create point
- open/edit POI description:
Hi Gynta, thanks! Unfortunately it doesn't work for me. The difference is that you are using waypoints, while in my case the link comes from a UTFgrid / mbtiles.
Menion, in the example I sent earlier, I used target="_blank" in the link. In that case, if I click the link in the popup (e.g., see figure1.png), I get the warning "Unable to find application to perform this action" (see figure2.png, warning in Dutch).
However, when I do not use target="_blank" in the link, and I click the link in the popup, the popup stays, the title of the popup remains the same, but the text disappears, see figure3.png.
Hi Gynta, thanks! Unfortunately it doesn't work for me. The difference is that you are using waypoints, while in my case the link comes from a UTFgrid / mbtiles.
Menion, in the example I sent earlier, I used target="_blank" in the link. In that case, if I click the link in the popup (e.g., see figure1.png), I get the warning "Unable to find application to perform this action" (see figure2.png, warning in Dutch).
However, when I do not use target="_blank" in the link, and I click the link in the popup, the popup stays, the title of the popup remains the same, but the text disappears, see figure3.png.
it works for you with waypoint popup?
it works for you with waypoint popup?
Hmm I have quite serious problems to make this work. Because you need to click on link in some loaded text and meanwhile change this link from relative to absolute path.
...
oki an hour later I found some working solution. Link open page in default web browser, not directly in Locus. So you will see in a next version how it works. Btw. nice system with external pages!
Hmm I have quite serious problems to make this work. Because you need to click on link in some loaded text and meanwhile change this link from relative to absolute path.
...
oki an hour later I found some working solution. Link open page in default web browser, not directly in Locus. So you will see in a next version how it works. Btw. nice system with external pages!
This is great, looking forwards to the new version!
This is great, looking forwards to the new version!
seems, it works with last beta...
seems, it works with last beta...
This works great in the latest update, thanks Menion. I am working on a number of maps that implement this new feature. I'll post a link when ready.
This works great in the latest update, thanks Menion. I am working on a number of maps that implement this new feature. I'll post a link when ready.
Hi Menion, tested it now with offline map (example) and unfortunately it doesn't work (anymore). Before I could choose to open the page in Firefox, Chrome or the stock browser, but now I can only open the link to the local html file in Firefox.
I read that Chrome and the stock browser seem to have some security measure disabling one to open local files. But on my tablet (Android 4.2.1) I can copy the link to the Chrome browser and it will open it. Doing the same on my phone will give me an "access to the file was denied", which is perhaps because on my phone I have the Locus data files on my sd card?
Hi Menion, tested it now with offline map (example) and unfortunately it doesn't work (anymore). Before I could choose to open the page in Firefox, Chrome or the stock browser, but now I can only open the link to the local html file in Firefox.
I read that Chrome and the stock browser seem to have some security measure disabling one to open local files. But on my tablet (Android 4.2.1) I can copy the link to the Chrome browser and it will open it. Doing the same on my phone will give me an "access to the file was denied", which is perhaps because on my phone I have the Locus data files on my sd card?
Yes, same URL:
file:///storage/sdcard1/Android/data/menion.android.locus.pro/files/Locus/maps/burundi_ol_v2_0/factsheets/Burundi/Ff.html
Works in Firefox, but not in Chrome
Yes, same URL:
file:///storage/sdcard1/Android/data/menion.android.locus.pro/files/Locus/maps/burundi_ol_v2_0/factsheets/Burundi/Ff.html
Works in Firefox, but not in Chrome
Hmm then I'm worried that I cannot help here. If URL is valid (and probably is, because otherwise Locus do not convert it from relative to absolute - like in previous case with "Be-We.html" file), then it is just on web browser if it opens mentioned URL or not. And based on todays discussion, it is not the only problem of Chrome: http://help.locusmap.eu/topic/locus-pro-stuck-as-default-app-for-pdfs
Hmm then I'm worried that I cannot help here. If URL is valid (and probably is, because otherwise Locus do not convert it from relative to absolute - like in previous case with "Be-We.html" file), then it is just on web browser if it opens mentioned URL or not. And based on todays discussion, it is not the only problem of Chrome: http://help.locusmap.eu/topic/locus-pro-stuck-as-default-app-for-pdfs
Yes, this issue with Chrome is quite annoying. I would guess it is related to this build in security provision of Chrome
that prevents it from loading HTML files that are stored on an external
SD card. But then why would you be able to open it in Chrome? Anyway, as you said, this is more of a problem of Chrome than Locus. Thanks for all efforts!
Yes, this issue with Chrome is quite annoying. I would guess it is related to this build in security provision of Chrome
that prevents it from loading HTML files that are stored on an external
SD card. But then why would you be able to open it in Chrome? Anyway, as you said, this is more of a problem of Chrome than Locus. Thanks for all efforts!
Replies have been locked on this page!