radarlabs / radar-sdk-js

Web JavaScript SDK for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
42 stars 11 forks source link

Map initalization `language` param #161

Closed jaspk06 closed 4 months ago

jaspk06 commented 4 months ago

Adds the map option language to configure map language. This only works for Radar map styles as it searchs and replaces for the expression ["get", "radar:name_client_language"].

Also sends up the header X-Radar-Device-Language with every style request which grabs from navigator.language. This is so that the server can figure out how to transform the style appropriately given the browser language.