Skip to content

Commit

Permalink
feat(draw): added draw component and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui Nunes committed Jul 19, 2022
1 parent 0995e17 commit f8b7a05
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/ToolMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
faMousePointer,
faPlus,
faChevronRight,
faChevronLeft
faChevronLeft,
faDrawPolygon
} from '@fortawesome/free-solid-svg-icons';
import {
FontAwesomeIcon
Expand Down Expand Up @@ -73,6 +74,7 @@ import PrintForm from '../PrintForm';
import SHOGunMapFishPrintV3TiledWMSSerializer from '../PrintForm/Serializer/SHOGunMapFishPrintV3TiledWMSSerializer';
import SHOGunMapFishPrintV3WMSSerializer from '../PrintForm/Serializer/SHOGunMapFishPrintV3WMSSerializer';

import Draw from './Draw';
import FeatureInfo from './FeatureInfo';
import LayerTree from './LayerTree';
import Measure from './Measure';
Expand Down Expand Up @@ -218,6 +220,18 @@ export const ToolMenu: React.FC<ToolMenuProps> = ({
}
]
},
{
className: 'draw',
key: 'draw_tools',
icon: <FontAwesomeIcon icon={faDrawPolygon} />,
label: t('ToolMenu.draw'),
children: [
{
key: 'draw-panel',
label: <Draw />
}
]
},
{
key: 'feature_info',
onTitleClick: onSubmenuTitleClick,
Expand Down
18 changes: 18 additions & 0 deletions src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ export default {
clicktodrawline: 'Zum Zeichnen einer Linie klicken',
clicktodrawarea: 'Zum Zeichnen einer Fläche klicken'
},
Draw: {
point: 'Punkt',
line: 'Linie',
polygon: 'Polygon',
circle: 'Kreis',
rectangle: 'Rechteck',
text: 'Anmerkung'
},
FeatureInfo: {
usageHint: 'Klicken Sie in die Karte, um Detailinformationen zu erhalten.'
},
Expand All @@ -42,6 +50,7 @@ export default {
expand: 'Menu ausklappen',
collapse: 'Menu einklappen',
measure: 'Messen',
draw: 'Zeichnen',
featureInfo: 'Karteninhalte abfragen',
addWms: 'WMS hinzufügen',
print: 'Export',
Expand Down Expand Up @@ -113,6 +122,14 @@ export default {
clicktodrawline: 'Click to draw line',
clicktodrawarea: 'Click to draw area'
},
Draw: {
point: 'Point',
line: 'Line',
polygon: 'Polygon',
circle: 'Circle',
rectangle: 'Rectangle',
text: 'Annotation'
},
FeatureInfo: {
usageHint: 'Click on the map to get details about the clicked coordinate.'
},
Expand All @@ -132,6 +149,7 @@ export default {
expand: 'Expand',
collapse: 'Collapse',
measure: 'Measure',
draw: 'Draw',
featureInfo: 'Query map features',
addWms: 'Add WMS',
print: 'Export',
Expand Down

0 comments on commit f8b7a05

Please sign in to comment.