Everything you need
A complete library for visualizing Moroccan geographic data without a third-party mapping dependency.
Regions & provinces
12 regions and 75 provinces with accurate, ready-to-use geometries.
Choropleth & legend
Color zones from your own data with an automatically generated legend.
Markers & clustering
Plot data points with proportional sizing and optional clustering.
Custom themes
Use built-in presets or generate a full theme from your brand accent.
Search & zoom
Built-in zone search, smooth zoom and pan, and click-to-isolate interactions.
Lightweight & dependency-free
Pure SVG rendering with no third-party mapping library required.
Playground
Customize the map live. The matching code updates automatically.
Matching code
import { MoroccoMapView } from '@unischedule/morocco-map/react';import { colorScaleFromData, THEME_PRESETS } from '@unischedule/morocco-map';import '@unischedule/morocco-map/style.css'; const data = { /* e.g. { "Casablanca-Settat": 42, ... } */ };// Theme-adaptive scale (goes from theme fill to theme accent)const scale = colorScaleFromData(data, { stops: [[0, theme.fill], [1, theme.fillSelected]] }); <MoroccoMapView ref={mapRef} // mapRef.current.exportPng() / exportSvg() / print() / resetView() / isolate(name)... level="regions" theme={THEME_PRESETS.light} labelMode="auto" labelPlacement="inline" zoneValues={data} colorScale={scale.colorScale} legend={{ scale, title: "Locations", position: "bottom-right" }} markers={markers} // e.g. [{ id, lat, lng, label, value, offsetX, offsetY }] markerSizeRange={[5, 16]} hideRegionLabelNearMarkers zoomable searchable isolateOnClick onIsolate={(name) => console.log('isolated:', name)} onFeatureClick={(name) => console.log('clicked:', name)} onFeatureHover={(name) => console.log('hovered:', name)} onMarkerClick={(marker) => console.log('marker:', marker.id)} onSearchSelect={(r) => console.log('search:', r.name)}/>