From looking at the code, it looks like you are attaching a script tag to the page if it doesn't exist, and then attaching a method to the global scope to handle the callback. Out of curiosity is there a way to avoid attaching it to the global scope? What happens if you want to load two of these maps on the same page but two different react components. What happens then..since now there will be two callbacks....won't there be issues?
I'm guessing for to include being able to set the lang and Mkt, would update the props to include this and with these props append to the generated url.
Hi ,
I was wondering if there is support for localization.
https://bingmapsv8samples.azurewebsites.net/#Localize%20the%20Map%20(en-GB)
<script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?callback=GetMap&setLang=en&setMkt=en-GB&key=[YOUR_BING_MAPS_KEY]' async defer></script
>Supporting the setLang and setMkt attributes
From looking at the code, it looks like you are attaching a script tag to the page if it doesn't exist, and then attaching a method to the global scope to handle the callback. Out of curiosity is there a way to avoid attaching it to the global scope? What happens if you want to load two of these maps on the same page but two different react components. What happens then..since now there will be two callbacks....won't there be issues?
I'm guessing for to include being able to set the lang and Mkt, would update the props to include this and with these props append to the generated url.
Thanks, Derek