Forum Discussion
tscholze
Feb 09, 2022Iron Contributor
Problems using the Jetpack Compose sample
Hi team,
a while ago khalper helped me to understand dual screen design patterns a bit better. Thanks!
Now, I tried to run thehttps://github.com/microsoft/surface-duo-compose-samples for "Extended Canvas". It compiled successfully and it started running on my Surface Duo Gen 1.
Afterwards I hit a wall and maybe it's totally on my side and before I create an issue I just wanted to check with you if this is the expended behavior. All points below occur in spanned and non-spanned mode.
Things I recognized:
- The map is not zoomable
- The map is not tap able (no map marker is selectable)
- The map is cut off after moving it around - no new tiles are loaded
Screenshot
- Hi Tobbias,
That's easy, the map is not a real map (e.g. using Google Maps or Bing Maps), is just a simple image that is used to highlight the design pattern. Hence you cannot do any of the things you could do using a real map engine 🙂
You can see how in code the mock image is set: https://github.com/microsoft/surface-duo-compose-samples/blob/7aadf7b78f8b58365f3440a57fe3dcadab4c3cb7/ExtendedCanvas/src/main/java/com/microsoft/device/display/samples/extendedcanvas/HomePage.kt#L73
And the mock (image) itself: https://github.com/microsoft/surface-duo-compose-samples/blob/main/ExtendedCanvas/src/main/res/drawable/mock_map.png
Hope that this helps.
Thanks,
Cesar
3 Replies
- CesarValiente
Microsoft
Hi Tobbias,
That's easy, the map is not a real map (e.g. using Google Maps or Bing Maps), is just a simple image that is used to highlight the design pattern. Hence you cannot do any of the things you could do using a real map engine 🙂
You can see how in code the mock image is set: https://github.com/microsoft/surface-duo-compose-samples/blob/7aadf7b78f8b58365f3440a57fe3dcadab4c3cb7/ExtendedCanvas/src/main/java/com/microsoft/device/display/samples/extendedcanvas/HomePage.kt#L73
And the mock (image) itself: https://github.com/microsoft/surface-duo-compose-samples/blob/main/ExtendedCanvas/src/main/res/drawable/mock_map.png
Hope that this helps.
Thanks,
Cesar- tscholzeIron ContributorOh, **bleep** it. Sorry! I was just in the mood of "oh, yes this is what I need and I can have a look how MSFT used Maps using Compose".
Sorry team and thanks for the lightning fast answer!- CesarValiente
Microsoft
Ofc! no worries at all, please, keep asking questions!
If you are interested on using maps on SurfaceDuo (and using the extended canvas pattern as well), you can check out our Dual Screen experience example code that uses both Bing and Google maps --> https://github.com/microsoft/surface-duo-dual-screen-experience-example (although this app is using conventional view system and not Jetpack Compose).
And just in case you haven't tried (installed) it yet: https://play.google.com/store/apps/details?id=com.microsoft.device.samples.dualscreenexperience
-Cesar