问题
I am trying to make an indoor map of a hospital , when i click on certain buildings it would open their respective indoor maps and when i select a certain area of their respective floor it would show me further details.How can I achieve this?
Any suggestions would be appreciated.
P.S I have tried using image view but i can't get the image to scroll freely like a real map or a webview (pinch zoom in/zoom out ,rotation etc).
回答1:
As you wanted your "floor" to have the behavior of a map you should have look for custom map implementations.
Then you may have found that you can use your own Tile Overlay using a Custom Map Tile Provider as described in Using custom map tiles with Google Map API V2 for Android?
Or if you don't want to use Google, you can look at Open Street Map Android SDK
Ether way you are still responsible for the graphical assets of tile layers. As well as any UI/UX leading to the custom map view.
Alternatively there are third-party libraries for 'deep zoom' of an image which may provide the expected touch behavior like: https://github.com/davemorrissey/subsampling-scale-image-view
回答2:
You can have rooms as scolling views, with a background view image and buttons where you want to click. Clicking the buttons opens a popup with an image. You can also place transparent buttons on the buildings to have a natural feeling of click to open.
From your question it seems that you don't want to use web view, but you can code a regular html page/web app and use a web view to display it. That way, you only have a screen with a web view to deal with.
Then the possibilities are endless and fun and shifts in the web domain!
来源:https://stackoverflow.com/questions/57377660/i-want-to-make-an-indoor-map-how-can-i-accomplish-a-real-map-webview-like-scro