Skip to content

Commit

Permalink
ajout de boutons d'upload de fichier de style #12
Browse files Browse the repository at this point in the history
  • Loading branch information
pprev94 committed Jun 20, 2024
1 parent 092e5d5 commit ea88372
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import MapboxStyleParser from 'geostyler-mapbox-parser';
import SLDParser from 'geostyler-sld-parser';
import SldStyleParser from 'geostyler-sld-parser';
import QgisStyleParser from 'geostyler-qgis-parser';

import { useState } from 'react';
import { useMemo, useState } from 'react';
import { Form, Select } from 'antd';

import { CodeEditor, GeoStylerContext, GeoStylerContextInterface, GeoStylerLocale, locale as GsLocale } from 'geostyler';

import { Style as GsStyle } from 'geostyler-style';
import { Style as GsStyle, StyleParser } from 'geostyler-style';

import logo from './assets/images/logo.svg';
import './assets/styles/App.scss';
Expand Down Expand Up @@ -77,7 +77,7 @@ export const App: React.FC = () => {

const [style, setStyle] = useState(defaultStyle);

const sldParser = new SLDParser({
const sldParser = new SldStyleParser({
sldVersion: '1.1.0',
builderOptions: {
format: true,
Expand Down Expand Up @@ -115,6 +115,7 @@ export const App: React.FC = () => {
parsers={[sldParser, qgisStyleParser, mapboxStyleParser]}
defaultParser={sldParser}
showCopyButton={true}
showUploadButton={true}
showSaveButton={true}
onStyleChange={(style: GsStyle) => {
setStyle(style);
Expand All @@ -129,6 +130,7 @@ export const App: React.FC = () => {
parsers={[sldParser, qgisStyleParser, mapboxStyleParser]}
defaultParser={mapboxStyleParser}
showCopyButton={true}
showUploadButton={true}
showSaveButton={true}
onStyleChange={(style: GsStyle) => {
setStyle(style);
Expand Down

0 comments on commit ea88372

Please sign in to comment.