locked
How to set language of tile download URL? RRS feed

  • Question

  • Hello,

    I'm a newbie Qt programmer for developing Bing Map mobile APP.

    I got a map tile download url is like:

    "http://ecn.t2.tiles.virtualearth.net/tiles/h13212312220122322.jpeg?g=563&mkt=zh-Hant-TW”,

    but the name of road is English.

    I want to download the tile with road name in Chinese, and try to modify the parameter “mkt” of url to “zh-TW” or “zh-Hant”, but it’s not work. The road name in tile is still in English.

    Does anyone know how to set correct parameter for URL to download Traditional Chinese tiles? Or any documents for setting it?

    Sorry for my poor English. If you have any suggestions for me to set the language of Bing Map, please let me know.

    I’m very appreciate for your help.

    Thanks.  

    Friday, June 22, 2018 1:32 AM

Answers

  • Hi,
    If you accessing tiles outside of Bing Maps control read following article: https://msdn.microsoft.com/en-us/library/mt823633.aspx, that explains how it should be done.
    Also when requesting tiles from Imagery Metadata make sure to use AerialWithLabelsOnDemand or RoadOnDemand imagery sets.

    Following those instructions you should get below:
    http://ak.dynamic.t1.tiles.virtualearth.net/comp/ch/13212312220122322?mkt=zh-Hant&it=A,G,L&og=277&n=z&c4w=1
    or
    http://ak.dynamic.t0.tiles.virtualearth.net/comp/ch/13212312220122322?mkt=zh-TW&it=G,L&shading=hill&og=277&n=z&c4w=1

    • Proposed as answer by S1mon_ Friday, June 22, 2018 9:18 AM
    • Marked as answer by Ricky_Brundritt Friday, June 22, 2018 4:41 PM
    Friday, June 22, 2018 9:17 AM
  • Don't change the "it", "og", "n", "c4w", as this will result in URLs that aren't sup[ported and will break.  "og" indicates the imagery generation, this number changes everytime an update to the imagery occurs. "it" indicates different parameters to use when rendering the map server side, such as if labels should be rendered or not. "c4w" stands for "chine for world", basically, the map image the is returned aligns with the worlds view of China.
    Monday, June 25, 2018 4:06 PM

All replies

  • Hi LittleShen,

    Maybe this blog will help?

    https://blogs.bing.com/maps/2014/02/26/teaching-bing-maps-some-new-language-tricks/

    It has two options for Chinese:

    • zh-HK Chinese-Hong Kong SAR
    • zh-TW Chinese-Taiwan

    Sincerely,

    IoTGirl

    Friday, June 22, 2018 5:55 AM
  • Thanks IoTGirl,

    But it's not work to modify the "mkt" parameter to "zh-TW" or "ngt" mentioned in Blog.

    http://ecn.t2.tiles.virtualearth.net/tiles/h13212312220122322.jpeg?g=563&mkt=zh-TW

    While pasting above URL to browser, the road name of tile image is always in English no matter mkt is.

    Is the format of tile URL is too old?

    Or maybe has other correct setting to solve this problem.

    So cofuse.....



    • Edited by LittleShen Friday, June 22, 2018 7:39 AM
    Friday, June 22, 2018 7:32 AM
  • Hi,
    If you accessing tiles outside of Bing Maps control read following article: https://msdn.microsoft.com/en-us/library/mt823633.aspx, that explains how it should be done.
    Also when requesting tiles from Imagery Metadata make sure to use AerialWithLabelsOnDemand or RoadOnDemand imagery sets.

    Following those instructions you should get below:
    http://ak.dynamic.t1.tiles.virtualearth.net/comp/ch/13212312220122322?mkt=zh-Hant&it=A,G,L&og=277&n=z&c4w=1
    or
    http://ak.dynamic.t0.tiles.virtualearth.net/comp/ch/13212312220122322?mkt=zh-TW&it=G,L&shading=hill&og=277&n=z&c4w=1

    • Proposed as answer by S1mon_ Friday, June 22, 2018 9:18 AM
    • Marked as answer by Ricky_Brundritt Friday, June 22, 2018 4:41 PM
    Friday, June 22, 2018 9:17 AM
  • Thank you S1mon_.

    It's a great help for me to get the correct URL format and download Chinese tiles successfully. :-)

    BTW, may I ask the meanings of URL parameters, such as "it", "og", "n", "c4w", and so on please?



    • Edited by LittleShen Tuesday, June 26, 2018 12:07 AM
    Monday, June 25, 2018 9:41 AM
  • Don't change the "it", "og", "n", "c4w", as this will result in URLs that aren't sup[ported and will break.  "og" indicates the imagery generation, this number changes everytime an update to the imagery occurs. "it" indicates different parameters to use when rendering the map server side, such as if labels should be rendered or not. "c4w" stands for "chine for world", basically, the map image the is returned aligns with the worlds view of China.
    Monday, June 25, 2018 4:06 PM