PX Atlas is a free Joomla map extension for Joomla 5.4 and 6. You draw points, lines, polygons, circles and rectangles in layers on OpenStreetMap, Google Maps or your own picture, give each one a tooltip, popup or side panel, and show the map with a module or inside an article. OpenStreetMap needs no account and no API key.
Why not paste an embed code?
Joomla 6 has no map field or map module. The usual shortcut is the iframe that Google Maps or OpenStreetMap gives you. For one pin on a contact page that can be enough. What happens when you paste it into TinyMCE on a fresh Joomla 6.2 site depends on who you are:
- Every editing group except Super Users: the iframe is removed. Global Configuration » Text Filters gives Administrators, Managers, Authors, Editors and Publishers the Default Forbidden List, and
iframeis on it. An embed that a Super User saved is also gone once one of them saves that article. - Super Users: the iframe stays, with
sandbox=""added. TinyMCE's Sandbox Iframes option is on, and an empty sandbox blocks scripts. Both map embeds are drawn by scripts, so they stay blank. To exclude a provider you trust, open System » Plugins » Editor - TinyMCE, addgoogle.comoropenstreetmap.org(nohttps://, nowww.) to the Sandbox Iframe Exclusions List of your set, and paste the embed again: a savedsandbox=""is not removed.
On Joomla 5.4 the set's Joomla Text Filter switch is off by default. Prohibited Elements (script,applet,iframe) applies instead, and it removes the iframe for Super Users too. A site upgraded from 5.4 may still have that setting.
With ten places, an iframe also leaves the content somewhere else: names, photos and opening hours are kept in another service, outside your Media Manager, your permissions and your backups. An extension keeps them in Joomla.
What you get in 1.0
| Part | What it does |
|---|---|
| Objects | Points, polylines, polygons, circles and rectangles; up to 200 layers and 5,000 objects per map. Points can be pins, letter badges, Font Awesome icons or your own pictures |
| Display | Tooltip, popup or side panel per object, on click or hover, with a heading, text, an image and a button. On small maps, popups and side panels open as a bottom sheet |
| Layers | A layer control for visitors, layers that start hidden, zoom ranges for layers and objects |
| Command line | Export and import a map as one JSON file, create a module |
What it does not do: no address search (you place points or type coordinates), no routing, no live tracking.
OpenStreetMap, Google Maps or your own picture
| Background | What it needs | Use it when |
|---|---|---|
| OpenStreetMap | Nothing. The public tile server is meant for light use | Most sites: a few shops, an event, a walking route |
| Your tile service | A tile URL with {z}, {x} and {y}, and the attribution your provider asks for, in the PX Atlas options | A busy site, or a map style of your own |
| Google Maps | A browser API key with the Maps JavaScript API, restricted to your domain; Google bills your account | Visitors expect Google's map, or you already pay for it |
| Image map | A JPG, PNG or WebP from the Media Manager; positions are in pixels | A floor plan, campus, trade fair or drawn town map |
Map type is decided first: a geographic map can move between OpenStreetMap and Google later, but it cannot become an image map once it has objects. With OpenStreetMap or Google, the visitor's browser loads the map from that provider, so name it in your privacy notice. An image map asks nobody else. Leaflet and Google Maps are loaded only on pages that show such a map.
Six demo maps and how each is set up
The live demo runs on a plain Joomla 6 site with Cassiopeia. Each map answers a different question:
| Map | Setup | Why |
|---|---|---|
| City guide | Six layers; popups for sights, some with a photo, tooltips on hover for viewpoints; the tram line layer starts hidden | Visitors see the main places first and switch the rest on |
| Store locator | Letter badges; store details in a side panel; pick-up points as tooltips | Address, hours and a button need room, and the map stays visible |
| Delivery zones | Two circles with a radius in meters for the zones, a polygon and a rectangle for areas without delivery; content on hover | One short answer per area: time and price, or why not |
| Hiking trail | Four colored lines; a layer with water, trains and views from zoom 14 | Small icons would cover the trail when zoomed out |
| Floor plan | Image map; rooms as rectangles and polygons, side panel | The plan stays in view while the visitor reads about a room |
| Festival map | Image map on a drawn town map; stages as shapes, the parade as a dotted line | A drawn map can leave out everything that is not the festival |
From a CSV of places to a map
Nobody wants to click 80 branches onto a map. The package includes a console plugin with pxatlas:map:import, which reads a JSON file. This script builds that file from a comma-separated UTF-8 CSV with the columns name,lat,lng,address,url. Keep both outside the web root, for example in /home/you/atlas:
<?php
// csv2map.php – places.csv (name,lat,lng,address,url) to a PX Atlas transfer file
$stop = function (string $message) { fwrite(STDERR, "places.csv: $message\n"); exit(1); };
$in = fopen('places.csv', 'r') ?: $stop('not found');
$head = fgetcsv($in, null, ',', '"', '') ?: $stop('empty');
$head[0] = preg_replace('/^\xEF\xBB\xBF/', '', $head[0]); // Excel adds a BOM
$head === ['name', 'lat', 'lng', 'address', 'url'] || $stop('first row must be name,lat,lng,address,url');
$objects = [];
while ($row = fgetcsv($in, null, ',', '"', '')) {
if ($row === [null]) { // blank line
continue;
}
$n = count($objects) + 1;
count($row) === 5 || $stop("place $n: 5 columns expected");
$p = array_combine($head, $row);
is_numeric($p['lat']) && is_numeric($p['lng']) || $stop("place $n ({$p['name']}): lat and lng must be numbers like 52.3676");
$content = ['title' => $p['name'], 'body' => '<p>' . htmlspecialchars($p['address']) . '</p>'];
if ($p['url'] !== '') {
$content['button'] = ['label' => 'Details', 'url' => $p['url'], 'target' => '_self'];
}
$objects[] = [
'id' => "new-p$n", 'layer_id' => 'new-places', 'title' => $p['name'], 'type' => 'marker',
'geometry' => ['space' => 'geo', 'lat' => (float) $p['lat'], 'lng' => (float) $p['lng']],
'content' => $content,
'interaction' => ['display_mode' => 'popup', 'trigger' => 'click'],
];
}
echo json_encode([
'format' => 'pxatlas.map', 'version' => 1,
'map' => ['title' => 'Our places', 'map_type' => 'geographic', 'provider' => 'osm',
'center_lat' => 50.5, 'center_lng' => 10, 'zoom' => 5, 'width' => '100%', 'height' => '480px', 'state' => 1],
'document' => ['layers' => [['id' => 'new-places', 'title' => 'Places']], 'objects' => $objects],
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR);
Run the commands as the user that owns the site files, not as root. admin stands for your Joomla user name; the import has exactly that user's rights:
cd /home/you/atlas && php csv2map.php > map.json
cd /path/to/joomla
# check the file, nothing is written
php cli/joomla.php pxatlas:map:import /home/you/atlas/map.json --user=admin --dry-run --json
# create the map, then a module for it (7 = the map_id from the import)
php cli/joomla.php pxatlas:map:import /home/you/atlas/map.json --user=admin --json
php cli/joomla.php pxatlas:module:create --map=7 --user=admin --json
We ran it on Joomla 6.2 with three places. The dry run answered "ok":true with 1 layer and 3 objects. With a latitude of 152 it refused the file, named the value (document.objects.0.geometry.lat) and said "Latitude must be from -90 to 90." It cannot spot a missing coordinate that became 0, so the script stops on one. The last command prints the {loadmoduleid} tag, with the module's ID, to paste into an article.
When the list changes, import again with --map=7. That replaces all layers and objects of the map, including anything you drew by hand, and keeps its settings. The same format works for AI agents: administrator/components/com_pxatlas/AI.md describes every key, limit and error.
Install and show a map
- Requirements: Joomla 5.4 or 6, PHP 8.1 or later (Joomla 6 itself needs PHP 8.3), MySQL or MariaDB.
- Download
pkg_pxatlas-1.0.0.zipfrom the PX Atlas page. A free thepixel.dev account is enough. - Upload it in System » Install » Extensions. The package installs the component, the module and the console plugin.
- In Components » PX Atlas, click New, choose a geographic map or an image map and enter a title. An image map also needs its base image. Save, add a layer, draw, and set the status to Published (a new image map starts unpublished; an unpublished map shows nothing on the site).
- Create a PX Atlas module in Content » Site Modules, select the map and give it a position. For a map inside an article, leave the position empty and write
{loadmoduleid 123}with the module's ID. Joomla's Content - Load Modules plugin must be enabled.
Every screen is in the PX Atlas documentation. If you only need clickable spots on one photo, PX Hotspot is the simpler tool. For the sections around the map, see Joomla content blocks without a page builder. Places that live in your own database and have to sync every night are custom extension work.