Skip to content

Commit

Permalink
fix for a few typos in app.tsx comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
PVautour committed Oct 10, 2024
1 parent 4a51e7b commit 55773ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/geoview-core/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ async function fetchConfigFile(configUrl: string): Promise<string> {

/**
* Function to get a configuration from a div element who contains attributes to read from.
* If the div has one of the folllowing atttributes data-config, data-config-url or data-shared,
* it will try to get a valide configuration from the attribute content. If there is no such attributes,
* If the div has one of the following atttributes data-config, data-config-url or data-shared,
* it will try to get a valid configuration from the attribute content. If there is no such attributes,
* it will return a default config. If the data-geocore is present, it will inject the layer in the
* consifuration automatically
* configuration automatically.
*
* @param {Element} mapElement - Div map element with attributes
* @returns {Promise<TypeMapFeaturesConfig>} A promise who contains the caonfiguration to use
* @returns {Promise<TypeMapFeaturesConfig>} A promise that contains the configuration to use
*/
async function getMapConfig(mapElement: Element): Promise<TypeMapFeaturesConfig> {
// get language in wich we need to have the config file (if not provided, default to English)
const lang = mapElement.hasAttribute('data-lang') ? (mapElement.getAttribute('data-lang')! as TypeDisplayLanguage) : 'en';

// create a new config object and apply default
const lang = mapElement.hasAttribute('data-lang') ? (mapElement.getAttribute('data-lang')! as TypeDisplayLanguage) : 'en';
let mapConfig: MapFeatureConfig = api.config.getDefaultMapFeatureConfig(lang);

// check what type of config is provided (data-config, data-config-url or data-shared)
Expand Down

0 comments on commit 55773ca

Please sign in to comment.