digidem / leaflet-bing-layer

Bing Maps Layer for Leaflet v1.0.0
http://digidem.github.io/leaflet-bing-layer/
87 stars 53 forks source link

Different market #10

Closed resuly closed 7 years ago

resuly commented 8 years ago

Thank you for your great job.

I noticed that leaflet-bing-layer does not support well for other countries (culture:"zh-Hans"), but the following codes from bing dev center shows another way in China area: <script type='text/javascript' src='https://cn.bing.com/mapspreview/sdk/mapcontrol?branch=release&callback=loadMapScenario' async defer></script> (The default market setting there is var market = "zh-CN";)

How can I request layers from different market? Thank you.

gmaclennan commented 7 years ago

According to the Bing REST API docs there is a culture setting, that you can set as an option: https://github.com/gmaclennan/leaflet-bing-layer#parameters

If this does not work I'm not sure, this may be a limitation of the Imagery REST API. The code you share is from the JavaScript API, which is different.

(btw the culture setting only affects the map tiles themselves, all the controls on the map are rendered by Leaflet, so any localization would need to be done there)

gmaclennan commented 7 years ago

Assuming this is resolved.