Skip to content

Commit

Permalink
fix: Resolve naming conflict by importing TerraDraw in TerraDraw.svel…
Browse files Browse the repository at this point in the history
…te (#86)
  • Loading branch information
ciscorn authored Jan 22, 2025
1 parent 51f88b8 commit a8d7422
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-maplibre-gl",
"version": "0.1.2",
"version": "0.1.3",
"license": "(MIT OR Apache-2.0)",
"description": "Build interactive web maps effortlessly with MapLibre GL JS and Svelte",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions src/lib/maplibre/ext/terradraw/TerraDraw.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</script>

<script lang="ts">
import { TerraDraw } from 'terra-draw';
import { TerraDraw as Draw } from 'terra-draw';
import { TerraDrawMapLibreGLAdapter } from 'terra-draw-maplibre-gl-adapter';
import { getMapContext } from 'svelte-maplibre-gl';
Expand All @@ -32,19 +32,19 @@
ondeselect
}: {
mode: string;
modes: ConstructorParameters<typeof TerraDraw>[0]['modes'];
modes: ConstructorParameters<typeof Draw>[0]['modes'];
idStrategy?: IdStrategy<FeatureId>;
tracked?: boolean;
/** Terra Draw instance */
draw?: TerraDraw;
draw?: Draw;
onready?: () => void;
onfinish?: FinishListener;
onchange?: ChangeListener;
onselect?: SelectListener;
ondeselect?: DeselectListener;
} = $props();
draw = new TerraDraw({
draw = new Draw({
adapter: new TerraDrawMapLibreGLAdapter({ map: mapCtx.map }),
modes,
idStrategy,
Expand Down

0 comments on commit a8d7422

Please sign in to comment.