GoogleWebComponents / google-map

Google Maps web components
https://elements.polymer-project.org/elements/google-map
Other
438 stars 257 forks source link

Add support for maps Chinese version #241

Open alphayang opened 8 years ago

alphayang commented 8 years ago

Maps has a Chinese version to apply regulation and legal under http://www.google.cn/maps and api point is http://www.google.cn/maps/api/js. It's public access in China while .com one is not available because Great Fire Wall.

Add a country or other optional parameter to specify the Maps is very useful for web developers.

BTW, in my experience, http://www.google.cn/maps/api/js and https://www.google.com/maps/api/js share the same codebase and functional but different tiles resources.

ebidel commented 8 years ago

I wonder if there's a way we can load the correct version automatically rather than exposing a country properties most developers will never use?

gutenye commented 8 years ago

All services target to worldwide or developers in China need this feature.

Use country property or baseURL is very accurate, the automatic ways are request timeout, timezone or ip address location.

For who are interested, I've forked and hacked it at https://github.com/gutenye/google-map