Urgent.News

One page, thousands of outlets. See who else covered it.

Editions โ–พ

Tech

This Tool Lets You Add Themeable Production-Ready Maps Into Your React App ๐Ÿ”ฅ

If you've ever added a map to a React app, you know the drill. Pick a library, wrestle with API keys, fight the wrapper's styling system to make it match your design, then give up and drop down to raw MapLibre or Mapbox anyway. Most map libraries are either too opinionated to customize or too low-level to be a good starting point. mapcn takes a different approach, and it's the same approach thatโ€ฆ

Mapcn is a new set of React map components that make it easy to add production-ready, themeable maps to your React applications. Unlike other map libraries that are either too opinionated or too low-level, mapcn provides customizable components built on top of MapLibre GL and styled with Tailwind CSS.

One of the standout features of mapcn is that it doesn't require an API key to get started. It ships with free CARTO basemap tiles, allowing you to have a working map immediately with no signup process. The components are designed to be theme-aware out of the box, automatically switching between light and dark styles based on your app's theme.

Another advantage of mapcn is that you own the code since the components are copied into your project rather than being pulled in as an opaque dependency. This means you can edit anything and there's no version lock-in or fighting an abstraction layer to override styles. The library also supports not just MapLibre, but any MapLibre-compatible tile provider, so you can switch providers when needed.

TypeScript users will be pleased to know that mapcn comes with full TypeScript support. If you need more control than the provided components offer, you can always drop down to the raw MapLibre instance.

To get started with mapcn, you just need Tailwind CSS and shadcn/ui set up in your project. Adding the map component is as simple as running the command: pnpm dlx shadcn@latest add @mapcn/map. This installs maplibre-gl and adds the map component into your project, all without any additional configuration.

Using mapcn is as straightforward as using any other shadcn component. Here's an example of how to render a basic map with zoom controls:

```jsx

import { Map, MapControls } from "@/components/ui/map";

import { Card } from "@/components/ui/card";

export function MyMap() {

return (

<Card className="h-[320px] p-0 overflow-hidden">

<Map

center={[-74.006, 40.7128]}

zoom={11}

/>

<MapControls />

</Card>

);

}

```

This code creates a rendered, interactive, theme-aware map with zoom controls, all without the need for an API key or configuration file.

Under the hood, MapLibre parses map tiles in a Web Worker, which ships as a separate file. mapcn loads this worker from unpkg by default, but you can self-host the worker files in your public/ folder and point MapLibreGL.setWorkerUrl() at them if you're running under a strict Content Security Policy.

The mapcn library also supports markers, popups, and tooltips, allowing you to compose small pieces to create interactive maps. You can use the MapMarker, MarkerContent, MarkerPopup, and MarkerTooltip components to add markers to your map, each with its own styling and functionality.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Why Reading Newsletters Makes You a Sharper, More Focused Developer

If you're a developer in 2026, you already know the feeling: you close one tab about a new framework, and three more have opened claiming to replace it. New AI tooling drops weekly.

  • Newsletters filter out information noise, presenting curated, relevant updates weekly or daily.
  • Structured format promotes focus and productivity, integrating reading into daily routine.

A Free 16-Week Cloud and DevOps Syllabus for Karachi (2026)

Every free resource you need to go from zero to a genuinely hireable cloud or DevOps skill set already exists, and most of it is free. The problem was never access.

  • Free 16-week syllabus released for Karachi to develop cloud and DevOps skills.
  • Covers Linux commands, Git, programming, cloud platform, containers, and CI/CD pipelines.
  • Emphasizes hands-on practice, real projects, and GitHub pipeline creation.

The pipeline was green. The product was underspecified

The checks all passed. I still would not have sent the resume. I had been using a Cursor agent to implement a private facts โ†’ prose resume generator.

  • Pipeline passed all technical checks but lacked proper specifications
  • Generated resume contained inaccuracies, such as full-time label for concurrent work
  • Specification failed to address human visual-acceptance criteria for resume content

More from Monday 17 August โ†’