Skip to content

Commit

Permalink
Merge pull request #60 from Pewillia/54-add-basemap-button
Browse files Browse the repository at this point in the history
 add basemap button
  • Loading branch information
jolevesq authored Nov 22, 2024
2 parents 1a649b0 + 28e49f7 commit fd51f72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/components/MapBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useContext, useState } from 'react';
import { CGPVContext } from '@/providers/cgpvContextProvider/CGPVContextProvider';
import _ from 'lodash';
import PillsAutoComplete from './PillsAutoComplete';
import { componentsOptions, footerTabslist, languageOptions, navBarOptions, appBarOptions, mapInteractionOptions, mapProjectionOptions, zoomOptions, themeOptions, CONFIG_FILES_LIST, corePackagesOptions } from '@/constants';
import { componentsOptions, footerTabslist, languageOptions, navBarOptions, basemapOptions,appBarOptions, mapInteractionOptions, mapProjectionOptions, zoomOptions, themeOptions, CONFIG_FILES_LIST, corePackagesOptions } from '@/constants';
import SingleSelectComplete from './SingleSelectAutoComplete';
import { ConfigSaveUploadButtons } from './ConfigSaveUploadButtons';

Expand Down Expand Up @@ -151,6 +151,13 @@ export function MapBuilder() {
defaultValue={getProperty('map.interaction')}
onChange={(value) => updateProperty('map.interaction', value)}
label="Map Interaction" placeholder="" />

<SingleSelectComplete
options={basemapOptions}
defaultValue={getProperty('map.basemapOptions.basemapId')}
onChange={(value) => updateProperty('map.basemapOptions.basemapId', value)}
label="Base Map" placeholder="" />

<FormGroup aria-label="position">
<FormLabel component="legend">Zoom Levels</FormLabel>

Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export const CONFIG_FILES_LIST: ListOptionType[] = [
export const basemapOptions: ListOptionType[] = [
{ title: 'Transport', value: 'transport' },
{ title: 'Simple', value: 'simple' },
{ title: 'World Map', value: 'world-map' }
{ title: 'Open Street Map', value: 'osm' },
{ title: 'Imagery', value: 'imagery' }
];

export const mapProjectionOptions: ListOptionType[] = [
Expand Down

0 comments on commit fd51f72

Please sign in to comment.