Does Xamarin.Forms.Maps work on Android in China?

Given the list of websites blocked in China (see https://en.wikipedia.org/wiki/Websites_blocked_in_mainland_China ), I am wondering whether Xamarin.Forms.Maps works on Android in China, or whether it is necessary to build something that uses Baidu Map or another map provider. Can anybody confirm please?

Many thanks,

John H.

Best Answers

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @JamesMontemagno - Thanks James. Are you aware of any mapping component for Xamarin that works reliably in China (currently the world's second largest economy)?

    Thanks,

    John H.

  • JohnHardmanJohnHardman GBUniversity mod
    edited November 2015

    @DirkWeltz - Many thanks Dirk. I'll take a look at OsmSharp. My preference would be to use Baidu for China if I can find a suitable component or API documentation in English (so far I've only found incomplete javadoc-generated documentation in Chinese). I'll keep OsmSharp as a fallback option, assuming it has maps available for mainland China..

  • JohnHardmanJohnHardman GBUniversity mod

    I've added Baidu support to my app, supporting both Baidu maps in a browser and the Baidu Maps app (which I have quickly removed from my phone again, due to the ridiculous number of permissions it requires).

    Adding the Baidu maps support wasn't that difficult. Google Translate did a good job on the Baidu documentation.

    It's interesting to compare Google Maps and Baidu Maps. There's a lot of similarity, but also a few differences. Being able to look inside restaurants to see what they look like is very handy :-) Baidu is more rigid in what it lets you do though, so some of the flexible querying I do with Google requires more structured data to work in Baidu.

  • LouisLiLouisLi CNMember

    Hi John,

    I am facing the same problem, can you share how to do the configuration to make Baidu map work on Android platform?
    Thanks in advance.

  • JohnHardmanJohnHardman GBUniversity mod
    edited October 2016

    @LouisLi - On Android, you can either use intents (if the Baidu app is installed on the device), or you can use a browser.

    To use an intent, use the package "com.baidu.BaiduMap" and then prefix your query string with "bdapp:"

    To use a browser, your URL will start "http://api.map.baidu.com"

    If you don't read Chinese, I suggest finding a developer in mainland China using fiverr.com or similar to do the initial work. That's what I did, although I then re-wrote what was delivered.

    Also, check out legal requirements related to mapping in China. Normal longitude/latitude won't give the expected location on a legal Chinese map.

    If installing Baidu on your device, be aware of the list of permissions it uses. I put it on devices I use purely for testing, rather than on the devices I use day-to-day.

  • LouisLiLouisLi CNMember

    @JohnHardman said:
    @LouisLi - On Android, you can either use intents (if the Baidu app is installed on the device), or you can use a browser.

    To use an intent, use the package "com.baidu.BaiduMap" and then prefix your query string with "bdapp:"

    To use a browser, your URL will start "http://api.map.baidu.com"

    If you don't read Chinese, I suggest finding a developer in mainland China using fiverr.com or similar to do the initial work. That's what I did, although I then re-wrote what was delivered.

    Also, check out legal requirements related to mapping in China. Normal longitude/latitude won't give the expected location on a legal Chinese map.

    If installing Baidu on your device, be aware of the list of permissions it uses. I put it on devices I use purely for testing, rather than on the devices I use day-to-day.

    Thanks for your reply, I am from China, so we can't use google map in android device. Now I find a dll named Xamarin.Forms.BaiduMaps in github, and I think that will save me a lot time, meanwhile, I keep using Xamarin.Forms.Maps in winphone and iOS.

Sign In or Register to comment.