From aee689bf7010c96504cd284ecd425f822881e2c7 Mon Sep 17 00:00:00 2001 From: Gormery Kombo Wanjiru Date: Sun, 12 Nov 2023 08:12:06 +0100 Subject: [PATCH 1/4] components work --- .gitignore | 3 +- README.md | 81 +++++------ package.json | 8 +- postcss.config.js | 6 + src/app.css | 4 + src/lib/EventBridge.js | 30 ++++ src/lib/components/Circle.svelte | 70 +++++++++ src/lib/components/CircleMarker.svelte | 70 +++++++++ src/lib/components/DivIcon.svelte | 24 ++++ src/lib/components/GeoJSON.svelte | 47 ++++++ src/lib/components/Icon.svelte | 19 +++ src/lib/components/ImageOverlay.svelte | 39 +++++ src/lib/components/LeafletMap.svelte | 39 +++++ src/lib/components/Marker.svelte | 70 +++++++++ src/lib/components/Polygon.svelte | 68 +++++++++ src/lib/components/Polyline.svelte | 60 ++++++++ src/lib/components/Popup.svelte | 40 ++++++ src/lib/components/Rectangle.svelte | 68 +++++++++ src/lib/components/ScaleControl.svelte | 26 ++++ src/lib/components/TileLayer.svelte | 39 +++++ src/lib/components/Tooltip.svelte | 40 ++++++ src/lib/extensions/RotatedMarkers.js | 65 +++++++++ src/lib/index.js | 23 +++ src/routes/+layout.svelte | 7 + src/routes/+page.js | 1 + src/routes/+page.svelte | 47 +++++- .../dpsri_70km_2021081710000000dBR.dpsri.png | Bin 0 -> 12789 bytes .../dpsri_70km_2021082110500000dBR.dpsri.png | Bin 0 -> 1896 bytes static/example.geojson | 135 ++++++++++++++++++ static/icons/airport.svg | 15 ++ svelte.config.js | 6 +- tailwind.config.js | 6 + 32 files changed, 1103 insertions(+), 53 deletions(-) create mode 100644 postcss.config.js create mode 100644 src/app.css create mode 100644 src/lib/EventBridge.js create mode 100644 src/lib/components/Circle.svelte create mode 100644 src/lib/components/CircleMarker.svelte create mode 100644 src/lib/components/DivIcon.svelte create mode 100644 src/lib/components/GeoJSON.svelte create mode 100644 src/lib/components/Icon.svelte create mode 100644 src/lib/components/ImageOverlay.svelte create mode 100644 src/lib/components/LeafletMap.svelte create mode 100644 src/lib/components/Marker.svelte create mode 100644 src/lib/components/Polygon.svelte create mode 100644 src/lib/components/Polyline.svelte create mode 100644 src/lib/components/Popup.svelte create mode 100644 src/lib/components/Rectangle.svelte create mode 100644 src/lib/components/ScaleControl.svelte create mode 100644 src/lib/components/TileLayer.svelte create mode 100644 src/lib/components/Tooltip.svelte create mode 100644 src/lib/extensions/RotatedMarkers.js create mode 100644 src/routes/+layout.svelte create mode 100644 src/routes/+page.js create mode 100644 static/dpsri_70km_2021081710000000dBR.dpsri.png create mode 100644 static/dpsri_70km_2021082110500000dBR.dpsri.png create mode 100644 static/example.geojson create mode 100644 static/icons/airport.svg create mode 100644 tailwind.config.js diff --git a/.gitignore b/.gitignore index e34943e..44294de 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ vite.config.ts.timestamp-* *.log .vscode -.dist \ No newline at end of file +.dist +.turbo \ No newline at end of file diff --git a/README.md b/README.md index 4fee31f..ddc9848 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,45 @@ -# create-svelte +# svelte-leaflet -Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). +Svelte component for [leaflet](https://leafletjs.com/) -Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging). +[Documentation & Demo](https://ngyewch.github.io/svelte-leaflet/) -## Creating a project +[Sample project](https://github.com/ngyewch/svelte-leaflet-test) -If you're seeing this, you've probably already done this step. Congrats! +## Component support -```bash -# create a new project in the current directory -npm create svelte@latest +- [x] Map -# create a new project in my-app -npm create svelte@latest my-app -``` +UI layers: +- [x] Marker +- [x] Popup +- [x] Tooltip -## Developing +Raster layers: +- [x] TileLayer +- [x] TileLayer.WMS +- [x] ImageOverlay +- [ ] VideoOverlay -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: +Vector layers: +- [x] Polyline +- [x] Polygon +- [x] Rectangle +- [x] Circle +- [x] CircleMarker +- [ ] SVGOverlay -```bash -npm run dev +Other layers: +- [ ] LayerGroup +- [ ] FeatureGroup +- [x] GeoJSON -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` +Basic types: +- [x] Icon +- [x] DivIcon -Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. - -## Building - -To build your library: - -```bash -npm run package -``` - -To create a production version of your showcase app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. - -## Publishing - -Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). - -To publish your library to [npm](https://www.npmjs.com): - -```bash -npm publish -``` +Controls: +- [ ] Zoom +- [ ] Attribution +- [ ] Layers +- [x] Scale diff --git a/package.json b/package.json index 424420f..5f0b8a7 100644 --- a/package.json +++ b/package.json @@ -59,19 +59,25 @@ "@valiantlynx/eslint-config-custom": "^0.0.1", "@valiantlynx/tailwind-config": "^0.0.8", "@valiantlynx/tsconfig": "^0.0.25", + "autoprefixer": "^10.4.16", "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-svelte": "^2.30.0", + "postcss": "^8.4.31", "prettier": "^2.8.0", "prettier-plugin-svelte": "^2.10.1", "publint": "^0.1.9", "svelte": "^4.0.5", "svelte-check": "^3.4.3", + "tailwindcss": "^3.3.5", "tslib": "^2.4.1", "typescript": "^5.0.0", "vite": "^4.4.2" }, "svelte": "./dist/index.js", "types": "./dist/index.d.ts", - "type": "module" + "type": "module", + "dependencies": { + "leaflet": "^1.9.4" + } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..0f772168 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..9bb37ee --- /dev/null +++ b/src/app.css @@ -0,0 +1,4 @@ + +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/src/lib/EventBridge.js b/src/lib/EventBridge.js new file mode 100644 index 0000000..6b41d0b --- /dev/null +++ b/src/lib/EventBridge.js @@ -0,0 +1,30 @@ +export default class EventBridge { + + constructor(entity, dispatch, events = []) { + this.entity = entity; + + this.eventHandlers = []; + if (events) { + const eventMap = {}; + events.forEach(event => { + if (!(event in eventMap)) { + const handler = function (e) { + dispatch(event, e); + }; + this.eventHandlers.push({ + event: event, + handler: handler, + }); + entity.on(event, handler); + eventMap[event] = handler; + } + }); + } + } + + unregister() { + this.eventHandlers.forEach(entry => { + this.entity.off(entry.event, entry.handler); + }); + } +} \ No newline at end of file diff --git a/src/lib/components/Circle.svelte b/src/lib/components/Circle.svelte new file mode 100644 index 0000000..da455da --- /dev/null +++ b/src/lib/components/Circle.svelte @@ -0,0 +1,70 @@ + + +
+ {#if circle} + + {/if} +
diff --git a/src/lib/components/CircleMarker.svelte b/src/lib/components/CircleMarker.svelte new file mode 100644 index 0000000..3232ee6 --- /dev/null +++ b/src/lib/components/CircleMarker.svelte @@ -0,0 +1,70 @@ + + +
+ {#if circleMarker} + + {/if} +
diff --git a/src/lib/components/DivIcon.svelte b/src/lib/components/DivIcon.svelte new file mode 100644 index 0000000..8c01873 --- /dev/null +++ b/src/lib/components/DivIcon.svelte @@ -0,0 +1,24 @@ + + +
+ +
diff --git a/src/lib/components/GeoJSON.svelte b/src/lib/components/GeoJSON.svelte new file mode 100644 index 0000000..c8710d4 --- /dev/null +++ b/src/lib/components/GeoJSON.svelte @@ -0,0 +1,47 @@ + + +
+ {#if geojson} + + {/if} +
diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte new file mode 100644 index 0000000..468efdb --- /dev/null +++ b/src/lib/components/Icon.svelte @@ -0,0 +1,19 @@ + diff --git a/src/lib/components/ImageOverlay.svelte b/src/lib/components/ImageOverlay.svelte new file mode 100644 index 0000000..0646b7d --- /dev/null +++ b/src/lib/components/ImageOverlay.svelte @@ -0,0 +1,39 @@ + diff --git a/src/lib/components/LeafletMap.svelte b/src/lib/components/LeafletMap.svelte new file mode 100644 index 0000000..ff1ca7c --- /dev/null +++ b/src/lib/components/LeafletMap.svelte @@ -0,0 +1,39 @@ + + +
+ {#if map} + + {/if} +
diff --git a/src/lib/components/Marker.svelte b/src/lib/components/Marker.svelte new file mode 100644 index 0000000..c4c141e --- /dev/null +++ b/src/lib/components/Marker.svelte @@ -0,0 +1,70 @@ + + +
+ {#if marker} + + {/if} +
diff --git a/src/lib/components/Polygon.svelte b/src/lib/components/Polygon.svelte new file mode 100644 index 0000000..c03c104 --- /dev/null +++ b/src/lib/components/Polygon.svelte @@ -0,0 +1,68 @@ + + +
+ {#if polygon} + + {/if} +
diff --git a/src/lib/components/Polyline.svelte b/src/lib/components/Polyline.svelte new file mode 100644 index 0000000..ab91e19 --- /dev/null +++ b/src/lib/components/Polyline.svelte @@ -0,0 +1,60 @@ + + +
+ {#if polyline} + + {/if} +
diff --git a/src/lib/components/Popup.svelte b/src/lib/components/Popup.svelte new file mode 100644 index 0000000..e798121 --- /dev/null +++ b/src/lib/components/Popup.svelte @@ -0,0 +1,40 @@ + + +
+
+ +
+
\ No newline at end of file diff --git a/src/lib/components/Rectangle.svelte b/src/lib/components/Rectangle.svelte new file mode 100644 index 0000000..c5c10bb --- /dev/null +++ b/src/lib/components/Rectangle.svelte @@ -0,0 +1,68 @@ + + +
+ {#if rectangle} + + {/if} +
diff --git a/src/lib/components/ScaleControl.svelte b/src/lib/components/ScaleControl.svelte new file mode 100644 index 0000000..f02d0d6 --- /dev/null +++ b/src/lib/components/ScaleControl.svelte @@ -0,0 +1,26 @@ + diff --git a/src/lib/components/TileLayer.svelte b/src/lib/components/TileLayer.svelte new file mode 100644 index 0000000..116b21b --- /dev/null +++ b/src/lib/components/TileLayer.svelte @@ -0,0 +1,39 @@ + diff --git a/src/lib/components/Tooltip.svelte b/src/lib/components/Tooltip.svelte new file mode 100644 index 0000000..7629818 --- /dev/null +++ b/src/lib/components/Tooltip.svelte @@ -0,0 +1,40 @@ + + +
+
+ +
+
diff --git a/src/lib/extensions/RotatedMarkers.js b/src/lib/extensions/RotatedMarkers.js new file mode 100644 index 0000000..4a6e1c6 --- /dev/null +++ b/src/lib/extensions/RotatedMarkers.js @@ -0,0 +1,65 @@ +import L from 'leaflet'; + +const LeafletRotatedMarkersExtension = { + install: () => { + // save these original methods before they are overwritten + const proto_initIcon = L.Marker.prototype._initIcon; + const proto_setPos = L.Marker.prototype._setPos; + + const oldIE = (L.DomUtil.TRANSFORM === 'msTransform'); + + L.Marker.addInitHook(function () { + const iconOptions = this.options.icon && this.options.icon.options; + let iconAnchor = iconOptions && this.options.icon.options.iconAnchor; + if (iconAnchor) { + iconAnchor = (iconAnchor[0] + 'px ' + iconAnchor[1] + 'px'); + } + this.options.rotationOrigin = this.options.rotationOrigin || iconAnchor || 'center bottom'; + this.options.rotationAngle = this.options.rotationAngle || 0; + + // Ensure marker keeps rotated during dragging + this.on('drag', function (e) { + e.target._applyRotation(); + }); + }); + + L.Marker.include({ + _initIcon: function () { + proto_initIcon.call(this); + }, + + _setPos: function (pos) { + proto_setPos.call(this, pos); + this._applyRotation(); + }, + + _applyRotation: function () { + if (this.options.rotationAngle) { + this._icon.style[L.DomUtil.TRANSFORM + 'Origin'] = this.options.rotationOrigin; + + if (oldIE) { + // for IE 9, use the 2D rotation + this._icon.style[L.DomUtil.TRANSFORM] = 'rotate(' + this.options.rotationAngle + 'deg)'; + } else { + // for modern browsers, prefer the 3D accelerated version + this._icon.style[L.DomUtil.TRANSFORM] += ' rotateZ(' + this.options.rotationAngle + 'deg)'; + } + } + }, + + setRotationAngle: function (angle) { + this.options.rotationAngle = angle; + this.update(); + return this; + }, + + setRotationOrigin: function (origin) { + this.options.rotationOrigin = origin; + this.update(); + return this; + } + }); + } +}; + +export default LeafletRotatedMarkersExtension; diff --git a/src/lib/index.js b/src/lib/index.js index 47d3c46..fc70091 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -1 +1,24 @@ // Reexport your entry components here +import LeafletMap from './components/LeafletMap.svelte'; + +import Circle from './components/Circle.svelte'; +import CircleMarker from './components/CircleMarker.svelte'; +import GeoJSON from './components/GeoJSON.svelte'; +import Icon from './components/Icon.svelte'; +import DivIcon from './components/DivIcon.svelte'; +import ImageOverlay from './components/ImageOverlay.svelte'; +import Marker from './components/Marker.svelte'; +import Polyline from './components/Polyline.svelte'; +import Polygon from './components/Polygon.svelte'; +import Popup from './components/Popup.svelte'; +import Rectangle from './components/Rectangle.svelte'; +import ScaleControl from './components/ScaleControl.svelte'; +import TileLayer from './components/TileLayer.svelte'; +import Tooltip from './components/Tooltip.svelte'; + +import LeafletRotatedMarkersExtension from './extensions/RotatedMarkers'; + +LeafletRotatedMarkersExtension.install(); + +export { LeafletMap, Circle, CircleMarker, GeoJSON, Icon, DivIcon, ImageOverlay, Marker, Polyline, Polygon, Popup, Rectangle, ScaleControl, TileLayer, Tooltip }; +export default LeafletMap; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte new file mode 100644 index 0000000..0ff42b0 --- /dev/null +++ b/src/routes/+layout.svelte @@ -0,0 +1,7 @@ + + + + + diff --git a/src/routes/+page.js b/src/routes/+page.js new file mode 100644 index 0000000..a3d1578 --- /dev/null +++ b/src/routes/+page.js @@ -0,0 +1 @@ +export const ssr = false; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 0a45b69..182da93 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,3 +1,44 @@ -

Welcome to your library project

-

Create your package using @sveltejs/package and preview/showcase your work with SvelteKit

-

Visit kit.svelte.dev to read the documentation

+ + +
+ + + + Gardens by the Bay + Gardens by the Bay + + + Changi Airport + Changi Airport + + +
+ + + diff --git a/static/dpsri_70km_2021081710000000dBR.dpsri.png b/static/dpsri_70km_2021081710000000dBR.dpsri.png new file mode 100644 index 0000000000000000000000000000000000000000..c4a98aa418b4dcc164405b77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JtxEuXC|IKm28hHIXQO?~ms5hS0Fmh!@f*|o!I z`0|?W`yJsX-%=ZyisBP_-def~A3<9)Es@iNR-LXCXhv)!=#o1%4XP+5IUnV24U{e6 z$LVy?ayD+Al6)7`vDeXQy zf^fuGAYsbr0YeV_{{fhvPL0%jVe~gvj|^*dpO^@|GiSSzoc-{~$^&DE1YCrjIi%ikfW+I;P>E8{g zHI4OT_xI|^TZ$pl)PE8+OW_~BXV>>+g`~4DYB1NtYXGwO4HKBt_Xv=hqex+-5x()V za7b+9Ok!N@lA@)+4PUzXkPTihal{NZu>v{KU%NI>!>=6qeDu5g6Y@QUJj#NEX6hh> zZ`(;=G1)cUV**y15}P&iW_cXewVCW~e=Z><3YPdGRieU`X5lS>}C0SYP=j8Dl(TWSJ2^lddz z{<0#U_@Ar`7Bm&2>&>_Hw2@ess(V#Y8+$Cu|N8)JNz7URe9L*-o>nFskn?X9?3FE3 zizYAoxefiT(ro?Do;aCWhFwx)Z~4~BJLQ3)T$#Ub)bB(F7^TH#aK4G(QJjTOEB1Z# zazQcdedT_X)WBD>JKa|4GhL|faklHb7AiFWZd30;>foM<0af8XnE3+n34PIg!g6Ly zvNW>Gab%adHgZt;8u_)~aD8b#8+_{W4IeuS zGb<7N3(8JI!BIEBlf7M0CrhI=ilwY@r%Uq`3Hq!D(qF%OmbXWjjzA?h6sMxvpMtSd z|DRAJFm6qiD)FD#Qi$;9!72BWWE1qPt)|?M7XsPja&6&BhtAg$+q=9G4c_^4lCnYL U71C3GziI$1Ol?f6?s~laKS}$BdH?_b literal 0 HcmV?d00001 diff --git a/static/dpsri_70km_2021082110500000dBR.dpsri.png b/static/dpsri_70km_2021082110500000dBR.dpsri.png new file mode 100644 index 0000000000000000000000000000000000000000..b77a7c5cb99524079a73b6bd9ed465237388f7ec GIT binary patch literal 1896 zcmV-u2bcJXP)$fIzx{3$7ZDK= zSt%bsnyQJ2h=_=Y%#Aj=h=_=Yh=_=Yh=|B$a1EP?h#Z?=zc3Pt?214BR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Yf0d^f0`S%w`ZjWdww7y7_2v^grAqCB7)emjtfc6w(KaxpA zZWLKMha4ioU^80_I1yN6g8B@Bv7JC3CSg4$@}$79=Tl(0QI3dAKyKM>fG&nRi iL_|bHL_|bHF7pq$ER*0Y_MG_u0000ZRm literal 0 HcmV?d00001 diff --git a/static/example.geojson b/static/example.geojson new file mode 100644 index 0000000..7e69f4f --- /dev/null +++ b/static/example.geojson @@ -0,0 +1,135 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 103.80423545837404, + 1.261180110971354 + ], + [ + 103.8075828552246, + 1.2559457020523277 + ], + [ + 103.82028579711914, + 1.246764008650869 + ], + [ + 103.83187294006348, + 1.2367241764193095 + ], + [ + 103.84114265441893, + 1.2398991702201765 + ], + [ + 103.84998321533203, + 1.2529423479362864 + ], + [ + 103.83882522583006, + 1.2552592214155274 + ], + [ + 103.83590698242186, + 1.2542295001224182 + ], + [ + 103.8274097442627, + 1.2555166516754543 + ], + [ + 103.82122993469238, + 1.2607510614554567 + ], + [ + 103.80423545837404, + 1.261180110971354 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 103.84474754333495, + 1.2332059356094212 + ], + [ + 103.84517669677734, + 1.2264268731420438 + ], + [ + 103.84921073913574, + 1.2241957855317644 + ], + [ + 103.8479232788086, + 1.2233376744178823 + ], + [ + 103.8442325592041, + 1.2245390299004166 + ], + [ + 103.84097099304199, + 1.2223079407189943 + ], + [ + 103.84869575500487, + 1.2132977540467533 + ], + [ + 103.85272979736328, + 1.2124396394617285 + ], + [ + 103.85324478149414, + 1.218274813266135 + ], + [ + 103.85839462280273, + 1.2168160209974554 + ], + [ + 103.86002540588379, + 1.2206775282216544 + ], + [ + 103.86405944824219, + 1.2210207730401388 + ], + [ + 103.86345863342285, + 1.2246248409857066 + ], + [ + 103.85762214660645, + 1.2272849832663153 + ], + [ + 103.85968208312988, + 1.2330343139874234 + ], + [ + 103.84474754333495, + 1.2332059356094212 + ] + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/static/icons/airport.svg b/static/icons/airport.svg new file mode 100644 index 0000000..fcb8bfd --- /dev/null +++ b/static/icons/airport.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/svelte.config.js b/svelte.config.js index 348fa32..219dad5 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,5 @@ import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ const config = { @@ -7,7 +8,10 @@ const config = { // If your environment is not supported or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. adapter: adapter() - } + }, + preprocess: vitePreprocess({ + postcss: true + }), }; export default config; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..a286d07 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,6 @@ +// tailwind config is required for editor support +import sharedConfig from '@valiantlynx/tailwind-config/dist/tailwind.config'; +const config = { + presets: [sharedConfig] +}; +export default config; From 533a58b209ec3a58d21863c65474b0d8f7a0cd67 Mon Sep 17 00:00:00 2001 From: Gormery Kombo Wanjiru Date: Sun, 12 Nov 2023 08:13:20 +0100 Subject: [PATCH 2/4] format --- README.md | 6 + src/app.css | 1 - src/lib/EventBridge.js | 53 ++++--- src/lib/components/Circle.svelte | 112 +++++++-------- src/lib/components/CircleMarker.svelte | 112 +++++++-------- src/lib/components/DivIcon.svelte | 28 ++-- src/lib/components/GeoJSON.svelte | 66 ++++----- src/lib/components/Icon.svelte | 24 ++-- src/lib/components/ImageOverlay.svelte | 74 +++++----- src/lib/components/LeafletMap.svelte | 54 +++---- src/lib/components/Marker.svelte | 106 +++++++------- src/lib/components/Polygon.svelte | 108 +++++++------- src/lib/components/Polyline.svelte | 110 +++++++-------- src/lib/components/Popup.svelte | 56 ++++---- src/lib/components/Rectangle.svelte | 108 +++++++------- src/lib/components/ScaleControl.svelte | 36 ++--- src/lib/components/TileLayer.svelte | 76 +++++----- src/lib/components/Tooltip.svelte | 54 +++---- src/lib/extensions/RotatedMarkers.js | 101 ++++++------- src/lib/index.js | 18 ++- src/routes/+page.svelte | 49 ++++--- static/example.geojson | 187 +++++++------------------ svelte.config.js | 2 +- 23 files changed, 741 insertions(+), 800 deletions(-) diff --git a/README.md b/README.md index ddc9848..fbe33f3 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,20 @@ Svelte component for [leaflet](https://leafletjs.com/) - [x] Map UI layers: + - [x] Marker - [x] Popup - [x] Tooltip Raster layers: + - [x] TileLayer - [x] TileLayer.WMS - [x] ImageOverlay - [ ] VideoOverlay Vector layers: + - [x] Polyline - [x] Polygon - [x] Rectangle @@ -30,15 +33,18 @@ Vector layers: - [ ] SVGOverlay Other layers: + - [ ] LayerGroup - [ ] FeatureGroup - [x] GeoJSON Basic types: + - [x] Icon - [x] DivIcon Controls: + - [ ] Zoom - [ ] Attribution - [ ] Layers diff --git a/src/app.css b/src/app.css index 9bb37ee..b5c61c9 100644 --- a/src/app.css +++ b/src/app.css @@ -1,4 +1,3 @@ - @tailwind base; @tailwind components; @tailwind utilities; diff --git a/src/lib/EventBridge.js b/src/lib/EventBridge.js index 6b41d0b..8cf6ef6 100644 --- a/src/lib/EventBridge.js +++ b/src/lib/EventBridge.js @@ -1,30 +1,29 @@ export default class EventBridge { + constructor(entity, dispatch, events = []) { + this.entity = entity; - constructor(entity, dispatch, events = []) { - this.entity = entity; + this.eventHandlers = []; + if (events) { + const eventMap = {}; + events.forEach((event) => { + if (!(event in eventMap)) { + const handler = function (e) { + dispatch(event, e); + }; + this.eventHandlers.push({ + event: event, + handler: handler + }); + entity.on(event, handler); + eventMap[event] = handler; + } + }); + } + } - this.eventHandlers = []; - if (events) { - const eventMap = {}; - events.forEach(event => { - if (!(event in eventMap)) { - const handler = function (e) { - dispatch(event, e); - }; - this.eventHandlers.push({ - event: event, - handler: handler, - }); - entity.on(event, handler); - eventMap[event] = handler; - } - }); - } - } - - unregister() { - this.eventHandlers.forEach(entry => { - this.entity.off(entry.event, entry.handler); - }); - } -} \ No newline at end of file + unregister() { + this.eventHandlers.forEach((entry) => { + this.entity.off(entry.event, entry.handler); + }); + } +} diff --git a/src/lib/components/Circle.svelte b/src/lib/components/Circle.svelte index da455da..b7a8497 100644 --- a/src/lib/components/Circle.svelte +++ b/src/lib/components/Circle.svelte @@ -1,70 +1,70 @@
- {#if circle} - - {/if} + {#if circle} + + {/if}
diff --git a/src/lib/components/CircleMarker.svelte b/src/lib/components/CircleMarker.svelte index 3232ee6..ba630bd 100644 --- a/src/lib/components/CircleMarker.svelte +++ b/src/lib/components/CircleMarker.svelte @@ -1,70 +1,70 @@
- {#if circleMarker} - - {/if} + {#if circleMarker} + + {/if}
diff --git a/src/lib/components/DivIcon.svelte b/src/lib/components/DivIcon.svelte index 8c01873..0a4b087 100644 --- a/src/lib/components/DivIcon.svelte +++ b/src/lib/components/DivIcon.svelte @@ -1,24 +1,24 @@
- +
diff --git a/src/lib/components/GeoJSON.svelte b/src/lib/components/GeoJSON.svelte index c8710d4..fe230ed 100644 --- a/src/lib/components/GeoJSON.svelte +++ b/src/lib/components/GeoJSON.svelte @@ -1,47 +1,47 @@
- {#if geojson} - - {/if} + {#if geojson} + + {/if}
diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte index 468efdb..c33f109 100644 --- a/src/lib/components/Icon.svelte +++ b/src/lib/components/Icon.svelte @@ -1,19 +1,19 @@ diff --git a/src/lib/components/ImageOverlay.svelte b/src/lib/components/ImageOverlay.svelte index 0646b7d..f790de7 100644 --- a/src/lib/components/ImageOverlay.svelte +++ b/src/lib/components/ImageOverlay.svelte @@ -1,39 +1,39 @@ diff --git a/src/lib/components/LeafletMap.svelte b/src/lib/components/LeafletMap.svelte index ff1ca7c..685b259 100644 --- a/src/lib/components/LeafletMap.svelte +++ b/src/lib/components/LeafletMap.svelte @@ -1,39 +1,39 @@
- {#if map} - - {/if} + {#if map} + + {/if}
diff --git a/src/lib/components/Marker.svelte b/src/lib/components/Marker.svelte index c4c141e..58a5727 100644 --- a/src/lib/components/Marker.svelte +++ b/src/lib/components/Marker.svelte @@ -1,70 +1,70 @@
- {#if marker} - - {/if} + {#if marker} + + {/if}
diff --git a/src/lib/components/Polygon.svelte b/src/lib/components/Polygon.svelte index c03c104..690f7fb 100644 --- a/src/lib/components/Polygon.svelte +++ b/src/lib/components/Polygon.svelte @@ -1,68 +1,68 @@
- {#if polygon} - - {/if} + {#if polygon} + + {/if}
diff --git a/src/lib/components/Polyline.svelte b/src/lib/components/Polyline.svelte index ab91e19..5539810 100644 --- a/src/lib/components/Polyline.svelte +++ b/src/lib/components/Polyline.svelte @@ -1,60 +1,60 @@
- {#if polyline} - - {/if} + {#if polyline} + + {/if}
diff --git a/src/lib/components/Popup.svelte b/src/lib/components/Popup.svelte index e798121..54ae9c8 100644 --- a/src/lib/components/Popup.svelte +++ b/src/lib/components/Popup.svelte @@ -1,40 +1,40 @@
-
- -
-
\ No newline at end of file +
+ +
+ diff --git a/src/lib/components/Rectangle.svelte b/src/lib/components/Rectangle.svelte index c5c10bb..325f606 100644 --- a/src/lib/components/Rectangle.svelte +++ b/src/lib/components/Rectangle.svelte @@ -1,68 +1,68 @@
- {#if rectangle} - - {/if} + {#if rectangle} + + {/if}
diff --git a/src/lib/components/ScaleControl.svelte b/src/lib/components/ScaleControl.svelte index f02d0d6..5654b54 100644 --- a/src/lib/components/ScaleControl.svelte +++ b/src/lib/components/ScaleControl.svelte @@ -1,26 +1,26 @@ diff --git a/src/lib/components/TileLayer.svelte b/src/lib/components/TileLayer.svelte index 116b21b..d835e76 100644 --- a/src/lib/components/TileLayer.svelte +++ b/src/lib/components/TileLayer.svelte @@ -1,39 +1,41 @@ diff --git a/src/lib/components/Tooltip.svelte b/src/lib/components/Tooltip.svelte index 7629818..41c7fbd 100644 --- a/src/lib/components/Tooltip.svelte +++ b/src/lib/components/Tooltip.svelte @@ -1,40 +1,40 @@
-
- -
+
+ +
diff --git a/src/lib/extensions/RotatedMarkers.js b/src/lib/extensions/RotatedMarkers.js index 4a6e1c6..ace941d 100644 --- a/src/lib/extensions/RotatedMarkers.js +++ b/src/lib/extensions/RotatedMarkers.js @@ -1,65 +1,66 @@ import L from 'leaflet'; const LeafletRotatedMarkersExtension = { - install: () => { - // save these original methods before they are overwritten - const proto_initIcon = L.Marker.prototype._initIcon; - const proto_setPos = L.Marker.prototype._setPos; + install: () => { + // save these original methods before they are overwritten + const proto_initIcon = L.Marker.prototype._initIcon; + const proto_setPos = L.Marker.prototype._setPos; - const oldIE = (L.DomUtil.TRANSFORM === 'msTransform'); + const oldIE = L.DomUtil.TRANSFORM === 'msTransform'; - L.Marker.addInitHook(function () { - const iconOptions = this.options.icon && this.options.icon.options; - let iconAnchor = iconOptions && this.options.icon.options.iconAnchor; - if (iconAnchor) { - iconAnchor = (iconAnchor[0] + 'px ' + iconAnchor[1] + 'px'); - } - this.options.rotationOrigin = this.options.rotationOrigin || iconAnchor || 'center bottom'; - this.options.rotationAngle = this.options.rotationAngle || 0; + L.Marker.addInitHook(function () { + const iconOptions = this.options.icon && this.options.icon.options; + let iconAnchor = iconOptions && this.options.icon.options.iconAnchor; + if (iconAnchor) { + iconAnchor = iconAnchor[0] + 'px ' + iconAnchor[1] + 'px'; + } + this.options.rotationOrigin = this.options.rotationOrigin || iconAnchor || 'center bottom'; + this.options.rotationAngle = this.options.rotationAngle || 0; - // Ensure marker keeps rotated during dragging - this.on('drag', function (e) { - e.target._applyRotation(); - }); - }); + // Ensure marker keeps rotated during dragging + this.on('drag', function (e) { + e.target._applyRotation(); + }); + }); - L.Marker.include({ - _initIcon: function () { - proto_initIcon.call(this); - }, + L.Marker.include({ + _initIcon: function () { + proto_initIcon.call(this); + }, - _setPos: function (pos) { - proto_setPos.call(this, pos); - this._applyRotation(); - }, + _setPos: function (pos) { + proto_setPos.call(this, pos); + this._applyRotation(); + }, - _applyRotation: function () { - if (this.options.rotationAngle) { - this._icon.style[L.DomUtil.TRANSFORM + 'Origin'] = this.options.rotationOrigin; + _applyRotation: function () { + if (this.options.rotationAngle) { + this._icon.style[L.DomUtil.TRANSFORM + 'Origin'] = this.options.rotationOrigin; - if (oldIE) { - // for IE 9, use the 2D rotation - this._icon.style[L.DomUtil.TRANSFORM] = 'rotate(' + this.options.rotationAngle + 'deg)'; - } else { - // for modern browsers, prefer the 3D accelerated version - this._icon.style[L.DomUtil.TRANSFORM] += ' rotateZ(' + this.options.rotationAngle + 'deg)'; - } - } - }, + if (oldIE) { + // for IE 9, use the 2D rotation + this._icon.style[L.DomUtil.TRANSFORM] = 'rotate(' + this.options.rotationAngle + 'deg)'; + } else { + // for modern browsers, prefer the 3D accelerated version + this._icon.style[L.DomUtil.TRANSFORM] += + ' rotateZ(' + this.options.rotationAngle + 'deg)'; + } + } + }, - setRotationAngle: function (angle) { - this.options.rotationAngle = angle; - this.update(); - return this; - }, + setRotationAngle: function (angle) { + this.options.rotationAngle = angle; + this.update(); + return this; + }, - setRotationOrigin: function (origin) { - this.options.rotationOrigin = origin; - this.update(); - return this; - } - }); - } + setRotationOrigin: function (origin) { + this.options.rotationOrigin = origin; + this.update(); + return this; + } + }); + } }; export default LeafletRotatedMarkersExtension; diff --git a/src/lib/index.js b/src/lib/index.js index fc70091..659dd4b 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -20,5 +20,21 @@ import LeafletRotatedMarkersExtension from './extensions/RotatedMarkers'; LeafletRotatedMarkersExtension.install(); -export { LeafletMap, Circle, CircleMarker, GeoJSON, Icon, DivIcon, ImageOverlay, Marker, Polyline, Polygon, Popup, Rectangle, ScaleControl, TileLayer, Tooltip }; +export { + LeafletMap, + Circle, + CircleMarker, + GeoJSON, + Icon, + DivIcon, + ImageOverlay, + Marker, + Polyline, + Polygon, + Popup, + Rectangle, + ScaleControl, + TileLayer, + Tooltip +}; export default LeafletMap; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 182da93..9c4afe6 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,32 +1,32 @@
- - - - Gardens by the Bay - Gardens by the Bay - - - Changi Airport - Changi Airport - - + + + + Gardens by the Bay + Gardens by the Bay + + + Changi Airport + Changi Airport + +
@@ -41,4 +41,3 @@

Copyright © 2023 - All right reserved by me

- diff --git a/static/example.geojson b/static/example.geojson index 7e69f4f..6af00a3 100644 --- a/static/example.geojson +++ b/static/example.geojson @@ -1,135 +1,54 @@ { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "properties": {}, - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 103.80423545837404, - 1.261180110971354 - ], - [ - 103.8075828552246, - 1.2559457020523277 - ], - [ - 103.82028579711914, - 1.246764008650869 - ], - [ - 103.83187294006348, - 1.2367241764193095 - ], - [ - 103.84114265441893, - 1.2398991702201765 - ], - [ - 103.84998321533203, - 1.2529423479362864 - ], - [ - 103.83882522583006, - 1.2552592214155274 - ], - [ - 103.83590698242186, - 1.2542295001224182 - ], - [ - 103.8274097442627, - 1.2555166516754543 - ], - [ - 103.82122993469238, - 1.2607510614554567 - ], - [ - 103.80423545837404, - 1.261180110971354 - ] - ] - ] - } - }, - { - "type": "Feature", - "properties": {}, - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 103.84474754333495, - 1.2332059356094212 - ], - [ - 103.84517669677734, - 1.2264268731420438 - ], - [ - 103.84921073913574, - 1.2241957855317644 - ], - [ - 103.8479232788086, - 1.2233376744178823 - ], - [ - 103.8442325592041, - 1.2245390299004166 - ], - [ - 103.84097099304199, - 1.2223079407189943 - ], - [ - 103.84869575500487, - 1.2132977540467533 - ], - [ - 103.85272979736328, - 1.2124396394617285 - ], - [ - 103.85324478149414, - 1.218274813266135 - ], - [ - 103.85839462280273, - 1.2168160209974554 - ], - [ - 103.86002540588379, - 1.2206775282216544 - ], - [ - 103.86405944824219, - 1.2210207730401388 - ], - [ - 103.86345863342285, - 1.2246248409857066 - ], - [ - 103.85762214660645, - 1.2272849832663153 - ], - [ - 103.85968208312988, - 1.2330343139874234 - ], - [ - 103.84474754333495, - 1.2332059356094212 - ] - ] - ] - } - } - ] -} \ No newline at end of file + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [103.80423545837404, 1.261180110971354], + [103.8075828552246, 1.2559457020523277], + [103.82028579711914, 1.246764008650869], + [103.83187294006348, 1.2367241764193095], + [103.84114265441893, 1.2398991702201765], + [103.84998321533203, 1.2529423479362864], + [103.83882522583006, 1.2552592214155274], + [103.83590698242186, 1.2542295001224182], + [103.8274097442627, 1.2555166516754543], + [103.82122993469238, 1.2607510614554567], + [103.80423545837404, 1.261180110971354] + ] + ] + } + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [103.84474754333495, 1.2332059356094212], + [103.84517669677734, 1.2264268731420438], + [103.84921073913574, 1.2241957855317644], + [103.8479232788086, 1.2233376744178823], + [103.8442325592041, 1.2245390299004166], + [103.84097099304199, 1.2223079407189943], + [103.84869575500487, 1.2132977540467533], + [103.85272979736328, 1.2124396394617285], + [103.85324478149414, 1.218274813266135], + [103.85839462280273, 1.2168160209974554], + [103.86002540588379, 1.2206775282216544], + [103.86405944824219, 1.2210207730401388], + [103.86345863342285, 1.2246248409857066], + [103.85762214660645, 1.2272849832663153], + [103.85968208312988, 1.2330343139874234], + [103.84474754333495, 1.2332059356094212] + ] + ] + } + } + ] +} diff --git a/svelte.config.js b/svelte.config.js index 219dad5..f363d1d 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -11,7 +11,7 @@ const config = { }, preprocess: vitePreprocess({ postcss: true - }), + }) }; export default config; From 63375f0f36c63bb49ae5036b95c19c7308c236af Mon Sep 17 00:00:00 2001 From: Gormery Kombo Wanjiru Date: Sun, 12 Nov 2023 08:16:32 +0100 Subject: [PATCH 3/4] bump ts config --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f0b8a7..58d0add 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@valiantlynx/svelte-leaflet", - "version": "0.0.1", + "version": "0.0.2", "publishConfig": { "access": "public" }, From 5172d692d99581efabfb6b6e9e10b292a55a420d Mon Sep 17 00:00:00 2001 From: Gormery Kombo Wanjiru Date: Sun, 12 Nov 2023 10:45:40 +0100 Subject: [PATCH 4/4] svelte-leaflet.netlify.app --- package.json | 4 +- src/lib/site-components/Circle.svelte | 75 ++++++++++++ src/lib/site-components/CircleMarker.svelte | 120 +++++++++++++++++++ src/lib/site-components/DivIcon.svelte | 66 ++++++++++ src/lib/site-components/GeoJSON.svelte | 69 +++++++++++ src/lib/site-components/ImageOverlay.svelte | 63 ++++++++++ src/lib/site-components/LeafletMap.svelte | 64 ++++++++++ src/lib/site-components/Marker.svelte | 59 +++++++++ src/lib/site-components/MarkerIcon.svelte | 74 ++++++++++++ src/lib/site-components/Polygon.svelte | 115 ++++++++++++++++++ src/lib/site-components/Polyline.svelte | 71 +++++++++++ src/lib/site-components/Popup.svelte | 71 +++++++++++ src/lib/site-components/Rectangle.svelte | 77 ++++++++++++ src/lib/site-components/ScaleControl.svelte | 57 +++++++++ src/lib/site-components/TileLayer-WMS.svelte | 66 ++++++++++ src/lib/site-components/TileLayer.svelte | 57 +++++++++ src/lib/site-components/Tooltip.svelte | 63 ++++++++++ src/routes/+layout.svelte | 1 + src/routes/+page.js | 2 + src/routes/+page.svelte | 99 +++++++++------ static/icons/github.svg | 17 +++ static/icons/linkedin.svg | 2 + static/icons/twitter.svg | 17 +++ static/logo.jpg | Bin 0 -> 6069 bytes svelte.config.js | 2 +- vite.config.js | 2 +- 26 files changed, 1274 insertions(+), 39 deletions(-) create mode 100644 src/lib/site-components/Circle.svelte create mode 100644 src/lib/site-components/CircleMarker.svelte create mode 100644 src/lib/site-components/DivIcon.svelte create mode 100644 src/lib/site-components/GeoJSON.svelte create mode 100644 src/lib/site-components/ImageOverlay.svelte create mode 100644 src/lib/site-components/LeafletMap.svelte create mode 100644 src/lib/site-components/Marker.svelte create mode 100644 src/lib/site-components/MarkerIcon.svelte create mode 100644 src/lib/site-components/Polygon.svelte create mode 100644 src/lib/site-components/Polyline.svelte create mode 100644 src/lib/site-components/Popup.svelte create mode 100644 src/lib/site-components/Rectangle.svelte create mode 100644 src/lib/site-components/ScaleControl.svelte create mode 100644 src/lib/site-components/TileLayer-WMS.svelte create mode 100644 src/lib/site-components/TileLayer.svelte create mode 100644 src/lib/site-components/Tooltip.svelte create mode 100644 static/icons/github.svg create mode 100644 static/icons/linkedin.svg create mode 100644 static/icons/twitter.svg create mode 100644 static/logo.jpg diff --git a/package.json b/package.json index 58d0add..6cf266e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@valiantlynx/svelte-leaflet", - "version": "0.0.2", + "version": "0.0.3", "publishConfig": { "access": "public" }, @@ -25,6 +25,7 @@ "type": "git", "url": "git+https://github.com/valiantlynx/svelte-leaflet.git" }, + "homepage": "https://svelte-leaflet.netlify.app", "scripts": { "dev": "vite dev", "build": "vite build && npm run package", @@ -54,6 +55,7 @@ "devDependencies": { "@changesets/cli": "^2.26.2", "@sveltejs/adapter-auto": "^2.0.0", + "@sveltejs/adapter-static": "^2.0.3", "@sveltejs/kit": "^1.20.4", "@sveltejs/package": "^2.0.0", "@valiantlynx/eslint-config-custom": "^0.0.1", diff --git a/src/lib/site-components/Circle.svelte b/src/lib/site-components/Circle.svelte new file mode 100644 index 0000000..1099351 --- /dev/null +++ b/src/lib/site-components/Circle.svelte @@ -0,0 +1,75 @@ + + +
+

Circle Component

+

Basic Usage

+
+ + + + Sentosa + Sentosa + + +
+ +

Properties

+
+ latLng | Geographical point. | LatLng + radius | Radius in meters. | Number + color | Stroke color. | String("#3388ff") + weight | Stroke width in pixels. | Number(3) + opacity | Stroke opacity. | Number(1.0) + lineCap | Line cap shape. | String("round") + lineJoin | Line join shape. | String("round") + dashArray | Dash pattern. | String(null) + dashOffset | Dash offset. | String(null) + fill | Fill flag. | Boolean() + fillColor | Fill color. | String("#3388ff") + fillOpacity | Fill opacity. | Number(0.2) + fillRule | Fill rule. | String("evenodd") + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getCircle() + Returns the underlying Leaflet Circle object instance. + See https://leafletjs.com/reference.html#circle +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/CircleMarker.svelte b/src/lib/site-components/CircleMarker.svelte new file mode 100644 index 0000000..e2b181d --- /dev/null +++ b/src/lib/site-components/CircleMarker.svelte @@ -0,0 +1,120 @@ + + +
+

CircleMarker Component

+

Basic Usage

+
+ + + + Sentosa + Sentosa + + {#each polygon1 as point} + + {point} + {point} + + {/each} + +
+ +

Properties

+
+ latLng | Geographical point. | LatLng + radius | Radius in pixels. | Number(3) + color | Stroke color. | String("#3388ff") + weight | Stroke width in pixels. | Number(3) + opacity | Stroke opacity. | Number(1.0) + lineCap | Line cap shape. | String("round") + lineJoin | Line join shape. | String("round") + dashArray | Dash pattern. | String(null) + dashOffset | Dash offset. | String(null) + fill | Fill flag. | Boolean() + fillColor | Fill color. | String("#3388ff") + fillOpacity | Fill opacity. | Number(0.2) + fillRule | Fill rule. | String("evenodd") + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getCircleMarker() + Returns the underlying Leaflet CircleMarker object instance. + See https://leafletjs.com/reference.html#circlemarker +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/DivIcon.svelte b/src/lib/site-components/DivIcon.svelte new file mode 100644 index 0000000..06b769e --- /dev/null +++ b/src/lib/site-components/DivIcon.svelte @@ -0,0 +1,66 @@ + + + + +
+

Marker / DivIcon Component

+

Basic Usage

+
+ + + + + + + + +
+ using slot +
+
+
+
+
+ +

Properties

+
+ options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getIcon()Returns the underlying Leaflet Icon object instance. See https://leafletjs.com/reference.html#icon
+
+ \ No newline at end of file diff --git a/src/lib/site-components/GeoJSON.svelte b/src/lib/site-components/GeoJSON.svelte new file mode 100644 index 0000000..5d30b21 --- /dev/null +++ b/src/lib/site-components/GeoJSON.svelte @@ -0,0 +1,69 @@ + + +
+

GeoJSON Component

+

Basic Usage

+
+ + + + +
+ +

Properties

+
+ data | GeoJSON object | Object(undefined) + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getGeoJSON() + Returns the underlying Leaflet GeoJSON object instance. + See https://leafletjs.com/reference.html#geojson +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/ImageOverlay.svelte b/src/lib/site-components/ImageOverlay.svelte new file mode 100644 index 0000000..115619f --- /dev/null +++ b/src/lib/site-components/ImageOverlay.svelte @@ -0,0 +1,63 @@ + + +
+

ImageOverlay Component

+

Basic Usage

+
+ + + + +
+ +

Properties

+
+ imageUrl | URL to image file. | String + opacity | Opacity of the image overlay. | Number(1.0) + zIndex | Explicit zIndex of the layer. | Number(1) + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getImageOverlay() + Returns the underlying Leaflet ImageOverlay object instance. See + https://leafletjs.com/reference.html#imageoverlay +
+
diff --git a/src/lib/site-components/LeafletMap.svelte b/src/lib/site-components/LeafletMap.svelte new file mode 100644 index 0000000..60a6aef --- /dev/null +++ b/src/lib/site-components/LeafletMap.svelte @@ -0,0 +1,64 @@ + + + + +
+ +
+

LeafletMap Component

+

Basic Usage

+
+ + + +
+
+ + +
+

LeafletMap Properties

+
+ options | Options. See https://leafletjs.com/reference.html#map-option | Object(undefined) +
+
+ + +
+

LeafletMap Methods

+ + + + + + + + + + + + + +
NameDescription
getMap()Returns the underlying Leaflet Map object instance. See https://leafletjs.com/reference.html#map-factory
+
+ + +
+ \ No newline at end of file diff --git a/src/lib/site-components/Marker.svelte b/src/lib/site-components/Marker.svelte new file mode 100644 index 0000000..b0b4de4 --- /dev/null +++ b/src/lib/site-components/Marker.svelte @@ -0,0 +1,59 @@ + + + + +
+

Marker Component

+

Basic Usage

+
+ + + + + +
+ +

Properties

+
+ latLng | Geographical point. | LatLng + zIndexOffset | z-index offset. | Number(0) + icon | TODO L.Icon.Default | String + opacity | Opacity. | Number(1.0) + rotationAngle | Rotation angle. | Number(0) + rotationOrigin | Rotation origin. | String("center bottom") + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getMarker()Returns the underlying Leaflet Marker object instance. See https://leafletjs.com/reference.html#marker
+
+ \ No newline at end of file diff --git a/src/lib/site-components/MarkerIcon.svelte b/src/lib/site-components/MarkerIcon.svelte new file mode 100644 index 0000000..5effd72 --- /dev/null +++ b/src/lib/site-components/MarkerIcon.svelte @@ -0,0 +1,74 @@ + + + + +
+ + + +
+

Marker/Icon Component

+

Basic Usage

+
+ + + + + + + +
+
+ + +
+

Marker/Icon Properties

+
+ options | Options. | Object(undefined) +
+
+ + +
+

Marker/Icon Methods

+ + + + + + + + + + + + + +
NameDescription
getIcon()Returns the underlying Leaflet Icon object instance. See https://leafletjs.com/reference.html#icon
+
+
+ \ No newline at end of file diff --git a/src/lib/site-components/Polygon.svelte b/src/lib/site-components/Polygon.svelte new file mode 100644 index 0000000..f4d5785 --- /dev/null +++ b/src/lib/site-components/Polygon.svelte @@ -0,0 +1,115 @@ + + +
+

Polygon Component

+

Basic Usage

+
+ + + + Sentosa + Sentosa + + +
+ +

Properties

+
+ latLngs | Geographical points. | LatLng[] + color | Stroke color. | String("#3388ff") + weight | Stroke width in pixels. | Number(3) + opacity | Stroke opacity. | Number(1.0) + lineCap | Line cap shape. | String("round") + lineJoin | Line join shape. | String("round") + dashArray | Dash pattern. | String(null) + dashOffset | Dash offset. | String(null) + fill | Fill flag. | Boolean() + fillColor | Fill color. | String("#3388ff") + fillOpacity | Fill opacity. | Number(0.2) + fillRule | Fill rule. | String("evenodd") + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getPolygon() + Returns the underlying Leaflet Polygon object instance. + See https://leafletjs.com/reference.html#polygon +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/Polyline.svelte b/src/lib/site-components/Polyline.svelte new file mode 100644 index 0000000..66e880a --- /dev/null +++ b/src/lib/site-components/Polyline.svelte @@ -0,0 +1,71 @@ + + + +
+

Polyline Component

+

Basic Usage

+
+ + + + Marina Bay Sands to Changi Airport + + + Resorts World Sentosa to Vivo City + + +
+ +

Properties

+
+ latLngs | Geographical points. | LatLng[] + color | Stroke color. | String("#3388ff") + weight | Stroke width in pixels. | Number(3) + opacity | Stroke opacity. | Number(1.0) + lineCap | Line cap shape. | String("round") + lineJoin | Line join shape. | String("round") + dashArray | Dash pattern. | String(null) + dashOffset | Dash offset. | String(null) + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getPolyline() + Returns the underlying Leaflet Polyline object instance. + See https://leafletjs.com/reference.html#polyline +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/Popup.svelte b/src/lib/site-components/Popup.svelte new file mode 100644 index 0000000..d715c55 --- /dev/null +++ b/src/lib/site-components/Popup.svelte @@ -0,0 +1,71 @@ + + + + +
+

Popup Component

+

Basic Usage

+
+ + + + Gardens by the Bay + + + + + Changi Airport + + + +
+ +

Properties

+
+ options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getPopup()Returns the underlying Leaflet Popup object instance. See https://leafletjs.com/reference.html#popup
+
+ + + + \ No newline at end of file diff --git a/src/lib/site-components/Rectangle.svelte b/src/lib/site-components/Rectangle.svelte new file mode 100644 index 0000000..868c935 --- /dev/null +++ b/src/lib/site-components/Rectangle.svelte @@ -0,0 +1,77 @@ + + +
+

Rectangle Component

+

Basic Usage

+
+ + + + Sentosa + Sentosa + + +
+ +

Properties

+
+ latLngBounds | Geographical bounds. | LatLngBounds + color | Stroke color. | String("#3388ff") + weight | Stroke width in pixels. | Number(3) + opacity | Stroke opacity. | Number(1.0) + lineCap | Line cap shape. | String("round") + lineJoin | Line join shape. | String("round") + dashArray | Dash pattern. | String(null) + dashOffset | Dash offset. | String(null) + fill | Fill flag. | Boolean() + fillColor | Fill color. | String("#3388ff") + fillOpacity | Fill opacity. | Number(0.2) + fillRule | Fill rule. | String("evenodd") + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getRectangle() + Returns the underlying Leaflet Rectangle object instance. + See https://leafletjs.com/reference.html#rectangle +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/ScaleControl.svelte b/src/lib/site-components/ScaleControl.svelte new file mode 100644 index 0000000..deb031b --- /dev/null +++ b/src/lib/site-components/ScaleControl.svelte @@ -0,0 +1,57 @@ + + +
+

ScaleControl Component

+

Basic Usage

+
+ + + + +
+ +

Properties

+
+ position | Position. | String('topright') + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getScaleControl() + Returns the underlying Leaflet Control.Scale object instance. + See https://leafletjs.com/reference.html#control-scale +
+
+ \ No newline at end of file diff --git a/src/lib/site-components/TileLayer-WMS.svelte b/src/lib/site-components/TileLayer-WMS.svelte new file mode 100644 index 0000000..e1cd124 --- /dev/null +++ b/src/lib/site-components/TileLayer-WMS.svelte @@ -0,0 +1,66 @@ + + + + +
+

TileLayer Component

+

Basic Usage

+
+ + + + +
+ +

Properties

+
+ url | Tile layer URL template. | String + wms | If true, the layer will be created using `L.tileLayer.WMS()`. | Boolean + opacity | Opacity of the tiles. | Number(1.0) + zIndex | Explicit zIndex of the layer. | Number(1) + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getTileLayer()Returns the underlying Leaflet TileLayer.WMS object instance. See https://leafletjs.com/reference.html#tilelayer-wms
+
+ \ No newline at end of file diff --git a/src/lib/site-components/TileLayer.svelte b/src/lib/site-components/TileLayer.svelte new file mode 100644 index 0000000..cda483b --- /dev/null +++ b/src/lib/site-components/TileLayer.svelte @@ -0,0 +1,57 @@ + + + + +
+

TileLayer Component

+

Basic Usage

+
+ + + +
+ +

Properties

+
+ url | Tile layer URL template. | String + wms | If true, the layer will be created using `L.tileLayer.WMS()`. | Boolean + opacity | Opacity of the tiles. | Number(1.0) + zIndex | Explicit zIndex of the layer. | Number(1) + options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getTileLayer()Returns the underlying Leaflet TileLayer object instance. See https://leafletjs.com/reference.html#tilelayer
+
+ \ No newline at end of file diff --git a/src/lib/site-components/Tooltip.svelte b/src/lib/site-components/Tooltip.svelte new file mode 100644 index 0000000..e3adb40 --- /dev/null +++ b/src/lib/site-components/Tooltip.svelte @@ -0,0 +1,63 @@ + + + + +
+

Tooltip Component

+

Basic Usage

+
+ + + + Gardens by the Bay + Gardens by the Bay + + + + Changi Airport + + + Changi Airport + + + +
+ +

Properties

+
+ options | Options. | Object(undefined) +
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
getTooltip()Returns the underlying Leaflet Tooltip object instance. See https://leafletjs.com/reference.html#tooltip
+
+ \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0ff42b0..6fb0c0e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,6 @@ diff --git a/src/routes/+page.js b/src/routes/+page.js index a3d1578..14eb90d 100644 --- a/src/routes/+page.js +++ b/src/routes/+page.js @@ -1 +1,3 @@ export const ssr = false; + +export const prerender = true; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 9c4afe6..b123428 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,43 +1,70 @@ -
- - - - Gardens by the Bay - Gardens by the Bay - - - Changi Airport - Changi Airport - - -
+ -
-

Copyright © 2023 - All right reserved by me

-
- +

Docs

+ +
+ + + + + + + + + + + + + + + + +
diff --git a/static/icons/github.svg b/static/icons/github.svg new file mode 100644 index 0000000..bb7c4ce --- /dev/null +++ b/static/icons/github.svg @@ -0,0 +1,17 @@ + + + + + Github-color + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/static/icons/linkedin.svg b/static/icons/linkedin.svg new file mode 100644 index 0000000..6f9ebb0 --- /dev/null +++ b/static/icons/linkedin.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/static/icons/twitter.svg b/static/icons/twitter.svg new file mode 100644 index 0000000..b0a6442 --- /dev/null +++ b/static/icons/twitter.svg @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/static/logo.jpg b/static/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1dd354edb4da3773b88d8b7553bc85567e6f2779 GIT binary patch literal 6069 zcmbW5cTiK^xA#v-Ad~K13A`oimO#wj!LYu__TC|MG@UHrzGc_fu_r%8V! z{X_JB2NeDPMf7i=fAi2502ml_a$sN%00sQnR4|Y;XG&JMVv-9e7$QH(0cVf{a%Vh% z!mMP-8DvReBxf?RfbPV>aF@s9|C$7covea0UPcy1G9wFf=;h$^l6GV5@2o8{Og4;N zrmVj7-Fs2`%se!&J0WDCYc^@bA*JZ`lhkfqN2$07E^_4{tT{rruHH4j(J8teTXEh7 zQPwFF6^BZ^byYMa|I4ew^5In$>`|dI;;+@N$72xy`uf$Rs}=j|Z`bIXTaz`9q+hOW zng%UkVl~xD&MgYFo5d{2%}S95M77VUe>$K6*%{i&-8f^F7c}7D0F_)rwp}_4v#6Fx zI>k0pU{1t}_6dI!n6>H=Ozik4|e%JImYzMcXRcQAHDe^^9!%v>m)L5<-M0s z_F0{>_bZ*e+QJ&T0*wnm&Nq~`PL!$1)PAg8U$R?A=pn%aqOH;2gLI`^2&qMz8rK?V z0C(6Kl5NbNfIa_Ew=&e-I{GGd8>hdm4tGcP?OEew&Rz*$dvIZ@8!vmT(c9>s2qaXFC{iY9m+j#2gNdJ`jy7DiGt?_Q@_ zk+dt>^2@GY(VS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svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from '@sveltejs/adapter-auto'; +import adapter from '@sveltejs/adapter-static'; import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ diff --git a/vite.config.js b/vite.config.js index bbf8c7d..fce9e87 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,5 +2,5 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [sveltekit()] + plugins: [sveltekit()], });