Skip to content

Comments

Leaflet Adapter Implementation#33

Open
BhattaraiSijan wants to merge 2 commits intodevelopmentfrom
feat/leaflet-adapter
Open

Leaflet Adapter Implementation#33
BhattaraiSijan wants to merge 2 commits intodevelopmentfrom
feat/leaflet-adapter

Conversation

@BhattaraiSijan
Copy link
Collaborator

Closes: #16

Add LeafletAdapter.ts in src/essence/Basics/MapEngines/Adapters/ implementing the IMapEngine interface. This covers the adapter's core structure — lifecycle methods and basic view control — encapsulating Leaflet map instance creation and destruction.

What's included:

init(options: MapInitOptions) — initializes a Leaflet map instance, applies zoom control positioning, min/max zoom, and custom projection/CRS settings
destroy() — removes the Leaflet map and cleans up internal state
getNativeMap() — returns the underlying L.Map instance
getContainer() — returns the DOM container element
setView(center, zoom) — updates map view; accepts both {lat, lng} object and [lat, lng] array formats
setZoom(zoom) / setCenter(center) — individual view control methods
getZoom() / getCenter() — view state accessors
engine.ts update:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement LeafletAdapter (Lifecycle & View Control)

1 participant