-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map initalization language
param
#161
Merged
jaspk06
merged 11 commits into
release-4.3
from
jasonliu/maps-1070-programmatic-language-adjustment-detect-local-language
May 21, 2024
Merged
Map initalization language
param
#161
jaspk06
merged 11 commits into
release-4.3
from
jasonliu/maps-1070-programmatic-language-adjustment-detect-local-language
May 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jaspk06
changed the title
[MAPS-1070] Detect browser language custom style SDK
Detect browser language custom style SDK
May 10, 2024
jaspk06
commented
May 10, 2024
src/types.ts
Outdated
@@ -460,7 +460,7 @@ export interface RadarSearchGeofencesResponse extends RadarResponse { | |||
} | |||
|
|||
export interface RadarMapOptions extends Omit<maplibregl.MapOptions, 'transformRequest'> { | |||
container: string | HTMLElement; | |||
fallbackLanguage?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container
was already defined in the maplibregl.MapOptions
type
jaspk06
changed the title
Detect browser language custom style SDK
Client side language override
May 10, 2024
jaspk06
force-pushed
the
jasonliu/maps-1070-programmatic-language-adjustment-detect-local-language
branch
from
May 13, 2024 15:56
e2b7c1b
to
deccc3d
Compare
jaspk06
changed the title
Map initalization
Map initalization May 14, 2024
locale
paramlanguage
param
…age-adjustment-detect-local-language
jaspk06
commented
May 15, 2024
- revert navigator changes
kochis
approved these changes
May 21, 2024
kochis
added a commit
that referenced
this pull request
Jun 6, 2024
* Radar map UI kit refactor (#153) * support custom style * custom markers * Maplibre control radar logo * bump version * refactor mapui kit by inheriting maplibre-gl - bump tsconfig target from es2015->es2016 for compatibility with class inheritence * pass request header override in map transformRequest * version bump * include custom style id in marker request * new marker logic * Delete .vscode directory * add .vscode/ to .gitignore * bump version * bump version * update transformRequest and add custom styles to demo page * marker updates * remove `getOptions` from `RadarMarker` * better way to handle custom markers and image urls * add custom url input to marker demo page * compliation target changes and copy changes * set beta version --------- Co-authored-by: Craig Kochis <[email protected]> * `RadarMap.fitToMarkers` class method (#156) * Map initalization `language` param (#161) * fix radar-default-v1 fallback regression * bump version * marker default width and height * bump version * `RadarMarker` popup improvements (#166) * bump version * Support click event on marker instance (#167) * support click handlers on markers * log map click * force popup on click * Update marker params (#168) * update marker params * handle popup.element * bump maplibre version in peer deps (#169) * img alt text * bump version * update dev version of maplibre-gl * fix marker image width and height * remove unused navigator * update browserlist * remove beta tag * support number and string for marker width/height * fix types --------- Co-authored-by: Jason Liu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fromnavigator.language
. This is so that the server can figure out how to transform the style appropriately given the browser language.