Ok, Rob, I’ve now successfully generated an html file and markers using your “formula” above.
It’s does not have all functionality yet, but it’s probably a solution for my “advance marker usage”. Advanced being this functionality:
The app I’m struggling with is a kind of a “panorama app” showing my drone panoramas.
The panoramas are made with PTGUI, which also exports the panoramas to a “web format” (meaning a html file, some javascript and the image files themselves). An example is this:
http://www.allthumbsdev.com/BorgPanorama/panos/2daf1273f2747d6aeb019dcd02a6a3d0/pano.html
Now, the challenge is to show these panoramas within a webview to hide the URL. Before playing with the “realtime html assembly” solution above he app worked like this:
The main screen consisted of a top menu and a newMapView filling the rest of the screen. The mapView was populated with markers, each for a panorama position. Then, when such a marker was tapped I opened up the corresponding panorama html file in a separate scene with a webview. When the Android back button was pressed, I simply closed webview scene and returned to the main screen with the mapView.
This works absolutely brilliantly and looks about like this:
https://www.youtube.com/watch?v=2v8LQMObLWQ
But using a webview for both the map and the panorama is challenging, especially when it comes to the “back” handling. I can only see two solutions:
-
Recode the panorama html file so that it includes a back button which can be pressed
-
Somehow handle the back button press from within the app itself. If the back button is pressed I can
a] call the back() method on the webview
b] Load the local map URL in the webview
I’m hoping to avoid 1 since these files are generated by the panorama program and I really don’t want to mess with those files…
But both 2a and 2b depends on knowing if it is the map or if it is the pano that is showing in the webview and how can I know that? Is there some way of communicating back to the app that a marker has been tapped?
It’s been a very long day and I might have overlooked something very obvious, but currently I don’t see how I can solve this with the one-the-fly html assembly thing.