NetBox plugin for geospatial map views, tile layers, and optional route planning
Project description
NetBox GeoView
NetBox GeoView is a NetBox plugin for displaying infrastructure in a map-oriented view.
The current skeleton provides two tabs:
Map: primary view with an OpenStreetMap tile previewFilter: selection of devices, sites, locations, roles, and map parameters
Versioning
The plugin uses Semantic Versioning in the format MAJOR.MINOR.PATCH.
MAJOR: incompatible plugin changesMINOR: new backward-compatible featuresPATCH: bug fixes and small corrections
NetBox compatibility is managed separately through min_version and max_version in the plugin.
Project Note
This is a personal project to see how far one can go with a practical NetBox plugin idea.
Most of the code was generated with Codex as a coding co-pilot, but maintenance responsibility stays with the developer (the human still carries the pager).
Compatibility
| Plugin Release | NetBox |
|---|---|
0.2.x |
4.5.4 to 4.5.x |
Installation
Install inside the NetBox virtual environment:
pip install netbox-geoview
Optional: install directly from a tagged GitHub source archive:
pip install https://github.com/phlpr/netbox_geoview/archive/refs/tags/v0.2.0.tar.gz
Configuration
Example plugin settings for configuration.py:
PLUGINS = ["netbox_geoview"]
PLUGINS_CONFIG = {
"netbox_geoview": {
"start_latitude": 47.59397,
"start_longitude": 14.12456,
"start_zoom": 7,
"min_zoom": 2,
"max_zoom": 19,
"valhalla_url": "https://valhalla1.openstreetmap.de/route",
"valhalla_timeout": 10,
"valhalla_costing_options": ["auto", "bicycle", "pedestrian"],
"valhalla_default_costing": "auto",
"valhalla_request_defaults": {
"alternates": 1,
"directions_options": {
"units": "kilometers",
},
},
"valhalla_headers": {},
"valhalla_query": {},
"default_tile_layer": "OpenStreetMap",
"scroll_wheel_zoom": True,
"site_marker": {
"color": "#f1c40f",
"symbol": "",
"icon_url": "",
"icon_size": [28, 40],
"icon_anchor": [14, 40],
"popup_anchor": [0, -34],
},
"site_group_markers": {
"burgenland": {"color": "#f1c40f"},
"karnten": {"color": "#e74c3c"},
"niederosterreich": {"color": "#3498db"},
"oberosterreich": {"color": "#2ecc71"},
"salzburg": {"color": "#ff69b4"},
"steiermark": {"color": "#16a085"},
"tirol": {"color": "#9b59b6"},
"vorarlberg": {"color": "#34495e"},
"wien": {"color": "#f39c12"},
},
"tile_layers": [
{
"name": "OpenStreetMap",
"url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"attribution": "© OpenStreetMap contributors",
},
{
"name": "OpenStreetMap DE",
"url": "https://tile.openstreetmap.de/{z}/{x}/{y}.png",
"attribution": "© OpenStreetMap contributors",
},
{
"name": "OpenStreetMap HOT",
"url": "https://a.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",
"attribution": "© OpenStreetMap contributors, Humanitarian OpenStreetMap Team",
},
{
"name": "MapTiler Satellite",
"url": "https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg",
"attribution": "© MapTiler",
"query": {
"key": "YOUR_MAPTILER_API_KEY",
},
},
{
"name": "MapTiler Hybrid",
"url": "https://api.maptiler.com/maps/hybrid/{z}/{x}/{y}.png",
"attribution": "© MapTiler",
"query": {
"key": "YOUR_MAPTILER_API_KEY",
},
},
],
"tile_provider_url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
}
}
The same example is included in configuration.example.py.
Available settings:
start_latitude: initial map latitudestart_longitude: initial map longitudestart_zoom: initial map zoom levelmin_zoom: minimum allowed zoom levelmax_zoom: maximum allowed zoom levelvalhalla_url: base URL of the Valhalla route endpointvalhalla_timeout: timeout in seconds for route requestsvalhalla_costing_options: route profile options shown in UIvalhalla_default_costing: default route profilevalhalla_request_defaults: additional request payload defaultsvalhalla_headers: optional HTTP headers for Valhalla requestsvalhalla_query: optional query string parameters for Valhalla requestsdefault_tile_layer: default base layer name or IDscroll_wheel_zoom: enables zooming with the mouse wheelsite_marker: default marker appearance for selected sitessite_group_markers: marker overrides by site group name or slugtile_layers: list of available base layersquery: optional query string parameters per layer, useful for API keysheaders: optional HTTP headers per layertile_provider_url: upstream tile URL template with{z},{x}, and{y}
Satellite Providers
Providers with official API-key-based access that fit this plugin well:
MapTiler Satellite: simple raster tile API with API key in the request. Official docs: MapTiler Cloud APIMapTiler Hybrid: raster hybrid style with satellite imagery plus labels and borders, also usable with an API key. Inference from MapTiler's documented style family plus verified tile endpoint.Mapbox Satellite: raster tiles with access token authentication. Official docs: Mapbox Tilesets ReferenceEsri World Imagery: enterprise-capable imagery via ArcGIS location services and token-based authentication. Official docs: ArcGIS service endpoints and Esri Leaflet basemap example
Recommendation:
MapTiler Satelliteis the easiest fit for the current plugin because it follows a straightforward raster tile pattern with an API key.Mapbox Satellitealso fits well and can be configured today withquery.access_token.Esri World Imageryis a strong enterprise option, but its exact request pattern depends on the ArcGIS endpoint and token model you want to use.
Requirements
- NetBox
4.5.4(or4.5.xcompatible with this plugin release) - Python
>=3.12 - No additional Python runtime dependencies are required beyond NetBox's own environment
- Installation in the NetBox virtual environment (for example:
pip install <path-to-plugin>) - Plugin activation in
configuration.py:PLUGINS = ["netbox_geoview"]PLUGINS_CONFIG = {"netbox_geoview": {...}}
- For MapTiler layers: valid API key (
query.key) - Optional for routing: reachable Valhalla endpoint (
valhalla_url)
Firewall / Network Allowlist
NetBox GeoView fetches external map and route data server-side. So the egress rules must be applied on the NetBox host (or its outbound proxy), not only on client browsers.
Required for default tile setup:
HTTPS/443totile.openstreetmap.orgHTTPS/443totile.openstreetmap.deHTTPS/443toa.tile.openstreetmap.fr
Required when using MapTiler layers:
HTTPS/443toapi.maptiler.com
Optional when routing is enabled (Valhalla):
HTTPS/443to your configured Valhalla host fromvalhalla_url- For the shipped example:
HTTPS/443tovalhalla1.openstreetmap.de
If your environment uses an explicit outbound proxy, make sure NetBox can reach these hosts through that proxy and that TLS inspection does not break certificate validation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netbox_geoview-0.4.0.tar.gz.
File metadata
- Download URL: netbox_geoview-0.4.0.tar.gz
- Upload date:
- Size: 93.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02df34e3a7649983af05ebeb2e65e91dcaa1753304b750ca858902f65bb8404f
|
|
| MD5 |
178215daf37c1305e0cfab35d3ad76a1
|
|
| BLAKE2b-256 |
80e56979a6280ab5dcae0248ed7f646c957602917ad18022c6ef203b04d280bc
|
Provenance
The following attestation bundles were made for netbox_geoview-0.4.0.tar.gz:
Publisher:
publish-pypi.yml on phlpr/netbox_geoview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netbox_geoview-0.4.0.tar.gz -
Subject digest:
02df34e3a7649983af05ebeb2e65e91dcaa1753304b750ca858902f65bb8404f - Sigstore transparency entry: 1270797204
- Sigstore integration time:
-
Permalink:
phlpr/netbox_geoview@ff0090b7446615311b664fb7efb8e3533253cb3d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/phlpr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ff0090b7446615311b664fb7efb8e3533253cb3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file netbox_geoview-0.4.0-py3-none-any.whl.
File metadata
- Download URL: netbox_geoview-0.4.0-py3-none-any.whl
- Upload date:
- Size: 116.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dc42ead36eed1e6c9bddcb37643fd12329c73587515af86d270b22d5ca61f15
|
|
| MD5 |
16109de2671a80f59a6b6dd2d18b56ed
|
|
| BLAKE2b-256 |
737b903443e3b3ee8290385461a4695578de67497de4aa8bd80a375f110dd665
|
Provenance
The following attestation bundles were made for netbox_geoview-0.4.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on phlpr/netbox_geoview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netbox_geoview-0.4.0-py3-none-any.whl -
Subject digest:
5dc42ead36eed1e6c9bddcb37643fd12329c73587515af86d270b22d5ca61f15 - Sigstore transparency entry: 1270797232
- Sigstore integration time:
-
Permalink:
phlpr/netbox_geoview@ff0090b7446615311b664fb7efb8e3533253cb3d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/phlpr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ff0090b7446615311b664fb7efb8e3533253cb3d -
Trigger Event:
push
-
Statement type: