0

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).

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

2 Answers2

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

Morrison Chang
  • 11,691
  • 3
  • 41
  • 77
  • Thank you so much, Mr.Morrison. I have implemented the deep zoom library now I wanna know how can i check which specific area of the map was clicked. Any ideas , how I can achieve that ? – Salman Khan Aug 08 '19 at 03:48
  • You'll have to keep your own dataset of where Points of Interest (rooms, areas, objects) are located on your image. If you are trying to achieve something specific you should ask new question on StackOverflow and show code related to where you are stuck. – Morrison Chang Aug 08 '19 at 04:21
  • alright , i'll ask another question , thanks alot for your help Mr.Chang , I really appreciate it – Salman Khan Aug 08 '19 at 07:39
0

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!

  • 1
    I have tried the invisible buttons too but still i want to make it scrollable like a map, you guessed correct i'm not keen on using a webview – Salman Khan Aug 06 '19 at 14:07