geonode.maps.models

Attributes

logger

Classes

Map

A Map aggregates several layers together and annotates them with a viewport

MapLayer

The MapLayer model represents a layer included in a map. This doesn't just

Module Contents

geonode.maps.models.logger[source]
class geonode.maps.models.Map(*args, **kwargs)[source]

Bases: geonode.base.models.ResourceBase

A Map aggregates several layers together and annotates them with a viewport configuration.

last_modified[source]
urlsuffix[source]
featuredurl[source]
__str__()[source]
property datasets[source]
get_linked_resources(as_target: bool = False)[source]

Get all the linked resources to this ResourceBase instance. This is implemented as a method so that derived classes can override it (for instance, Maps may add related datasets)

json(dataset_filter)[source]

Get a JSON representation of this map suitable for sending to geoserver for creating a download of all layers

keyword_list()[source]
get_absolute_url()[source]
property embed_url[source]
get_bbox_from_datasets(layers)[source]

Calculate the bbox from a given list of Dataset objects

bbox format: [xmin, xmax, ymin, ymax]

property sender[source]
property class_name[source]
property is_public[source]
Returns True if anonymous (public) user can view map.
property dataset_group[source]
Returns layer group name from local OWS for this map instance.
publish_dataset_group()[source]

Publishes local map layers as WMS layer group on local OWS.

class Meta[source]

Bases: geonode.base.models.ResourceBase.Meta

class geonode.maps.models.MapLayer[source]

Bases: django.db.models.Model

The MapLayer model represents a layer included in a map. This doesn’t just identify the dataset, but also extra options such as which style to load and the file format to use for image tiles.

map[source]
dataset[source]
extra_params[source]
name[source]
store[source]
current_style[source]
ows_url[source]
local[source]
order[source]
visibility[source]
opacity[source]
property dataset_title[source]
Used by geonode/maps/templates/maps/map_download.html
Used by geonode/maps/templates/maps/map_download.html
property get_legend[source]
class Meta[source]
ordering = ['-pk'][source]
__str__()[source]