Skip to content

shadcn.io is an independent project built on shadcn/ui

Drone Flight Planner Map Block for React

A drone mission on a live map of Lisbon: drag five waypoints, set their heights, and watch four checks for the ceiling, two no-fly zones and the battery.

On this page5 sections

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Catch a bad mission before the drone leaves the ground, with this drone flight planner map for React with Base UI. Quadwren, a drone mission app, opens a bridge survey over the Tagus at Belém, Lisbon, on a live Map that follows your theme: five numbered waypoints joined by four legs, from the riverside lawn past the north pylon of the 25 de Abril bridge to the Alcântara docks, and two dashed circles that are no-fly zones, each closed below a stated height, under a 120 m ceiling. Drag a waypoint, or focus it and move it with the arrow keys, and set its height in the pane's Number Input; the pane sums the distance, the time at 12 m/s and the battery used. The four checks under the map fail in words and clear as soon as a number or a place is fixed ("Waypoint 4 is 135 m, 15 m over the 120 m ceiling", "Leg 3 crosses Zone B at 107 m, below its 110 m top"), while a failing leg or ring turns dashed and a crossed zone darkens, so the map and the words agree. Upload refuses while a check fails and otherwise marks the mission ready, sending nothing. Built from Map, Number Input, Shine Button, Button and Guides. For drone operators, survey and inspection teams, and mission-planning tools.

FAQ

What do the four checks test?

Heights: every waypoint must be between 10 and 120 m. Each no-fly zone: no leg may be inside its circle below its top height. Battery: a typed rate per kilometre flown plus one per 100 m climbed must leave a 30 percent reserve at landing. The first problem of each kind is named, with how many more there are, and Upload stays refused until all four pass.

How does it know a leg crosses a zone?

lowestIn samples 41 points along the leg, turns each into metres east and north of the leg's start, and keeps the lowest height of those inside the zone's circle; the height at a point is the straight blend of the leg's two ends. A leg crosses when that lowest height is under the zone's top. The circle drawn on the map is the same radius, so what you see is what is tested.

Can I plan without a mouse?

Yes. Every height is a number field with its own steppers; type a number and press Tab or Enter to settle it. Each waypoint on the map is a focusable marker: Tab to it and the arrow keys move it, Shift for bigger steps, and the legs, distances and checks follow. A polite message speaks the result once you stop typing.

How does it look on a phone?

The top bar wraps its status and buttons under the mission name, the map comes first with smaller rings and the heights left to the list, then the waypoints with their fields, the three figures and the four checks one under another. Two fingers move and zoom the map; one finger scrolls the page.

What stays local, and where does the map come from?

Everything you change stays in the page: nothing is uploaded to a drone and no airspace is looked up. The tiles are CARTO's basemaps over OpenStreetMap data, drawn by MapLibre GL, with their credit in the corner. In your app, load the zones from your airspace provider, check again on the server and send the mission only when every check passes. Reset puts the sample back.

Can I fly with it?

No. The places are real, but the zones, their heights, the battery rate and the mission are invented to show how a checker reads a plan. Real missions need the aviation authority's airspace data and permissions, wind, terrain and the aircraft's own limits.