Skip to main content

NetBox plugin for geospatial map views, tile layers, and optional route planning

Reason this release was yanked:

missing files

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 preview
  • Filter: selection of devices, sites, locations, roles, and map parameters

Versioning

The plugin uses Semantic Versioning in the format MAJOR.MINOR.PATCH.

  • MAJOR: incompatible plugin changes
  • MINOR: new backward-compatible features
  • PATCH: bug fixes and small corrections

NetBox compatibility is managed separately through min_version and max_version in the plugin.

Compatibility

Plugin Release NetBox
0.1.x 4.5.5 to 4.5.x

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 latitude
  • start_longitude: initial map longitude
  • start_zoom: initial map zoom level
  • min_zoom: minimum allowed zoom level
  • max_zoom: maximum allowed zoom level
  • valhalla_url: base URL of the Valhalla route endpoint
  • valhalla_timeout: timeout in seconds for route requests
  • valhalla_costing_options: route profile options shown in UI
  • valhalla_default_costing: default route profile
  • valhalla_request_defaults: additional request payload defaults
  • valhalla_headers: optional HTTP headers for Valhalla requests
  • valhalla_query: optional query string parameters for Valhalla requests
  • default_tile_layer: default base layer name or ID
  • scroll_wheel_zoom: enables zooming with the mouse wheel
  • site_marker: default marker appearance for selected sites
  • site_group_markers: marker overrides by site group name or slug
  • tile_layers: list of available base layers
  • query: optional query string parameters per layer, useful for API keys
  • headers: optional HTTP headers per layer
  • tile_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 API
  • MapTiler 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 Reference
  • Esri 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 Satellite is the easiest fit for the current plugin because it follows a straightforward raster tile pattern with an API key.
  • Mapbox Satellite also fits well and can be configured today with query.access_token.
  • Esri World Imagery is 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.5 (or 4.5.x compatible 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/443 to tile.openstreetmap.org
  • HTTPS/443 to tile.openstreetmap.de
  • HTTPS/443 to a.tile.openstreetmap.fr

Required when using MapTiler layers:

  • HTTPS/443 to api.maptiler.com

Optional when routing is enabled (Valhalla):

  • HTTPS/443 to your configured Valhalla host from valhalla_url
  • For the shipped example: HTTPS/443 to valhalla1.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_geoview-0.1.0.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_geoview-0.1.0-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

Details for the file netbox_geoview-0.1.0.tar.gz.

File metadata

  • Download URL: netbox_geoview-0.1.0.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netbox_geoview-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08a056aaa1f718be76216d2062d330959923f8ad55a87592c759362da0f39bb4
MD5 8cd0f6c8f42d28b5a9e9e4adbfa0eb43
BLAKE2b-256 f1c10979e60aa4fa6fe3e5f26a52c040649cb8985165c02c5741fcb44bfb43b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_geoview-0.1.0.tar.gz:

Publisher: publish-pypi.yml on phlpr/netbox_geoview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netbox_geoview-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: netbox_geoview-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 66.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netbox_geoview-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0e4a21d68912e5a806264615601c498cf389d4126d6579cffb67a22bc009e42
MD5 26f88fa642a89a54289761361267c87e
BLAKE2b-256 01b6348dfb96041a9c401c9e3785120fc6d626ec7e43cf8d6962f76fa00b6bac

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_geoview-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on phlpr/netbox_geoview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page