Skip to content

Map

info() ΒΆ

Returns metadata about a given map in JSON form.

Returns:

Type Description

A JSON encoded string representing the metadata

Source code in ckanext/tiledmap/routes/map.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@blueprint.route('/map-info')
def info():
    """
    Returns metadata about a given map in JSON form.

    :returns: A JSON encoded string representing the metadata
    """
    view_settings = _helpers.MapViewSettings.from_request()

    # ensure we have at least one map style enabled
    if not view_settings.is_enabled():
        return jsonify({'geospatial': False})

    return jsonify(view_settings.create_map_info())