1

I am building an app using Meteor and am living in China the next two months. My app doesn't work in China, since it is based on Google Maps.

I want to run some sort of a test to determine if the user is in China, and if in China, to run the Baidu maps instead of Google maps. These require separate html and javascript. Advice on how to structure this in Meteor?

Livvy Jeffs
  • 159
  • 1
  • 1
  • 11

1 Answers1

1

are there any other alternatives to baidu? Given recent events, I'm not sure I would recommend including their code snippets on anything.

Many net-savvy users in China are also behind VPNs, so that's further complication.

You could also use Leaflet.js and a tile server like https://www.mapbox.com/ Or you can even serve up your own tiles https://github.com/mapbox/tilestream

There's more in this topic on how to get a users IP address and then you could geolocate it, eg using this project.

Good luck behind the GFW!

Community
  • 1
  • 1
dcsan
  • 11,333
  • 15
  • 77
  • 118