CanvasMap
Getting Started Tutorials 3D Reference

Class CMLayerGrid extends CM2Layer

CMLayerGrid Class

Displays a raster based on the numeric values in a JSON file.


Copyright (C) 2020, Humboldt State University, Jim Graham

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see
.

Settings Group: Dataset

Setting Name Type Options Default Comments
URL URL CMTYPE_STRING null Full or partial URL to the dataset to load into the layer

Object Functions

Inherited From: CM2Layer
ReturnsFunctionThrows
RequestData(URL, DataSetType)

Object Functions

RequestData(URL, DataSetType)

Called to obtain the data for the layer from a URL.
Depricated, use:
- SetSetting("Dataset","URL",URL);
- SetSetting("Dataset","Format",Format);
- RequestData()

TheView is required so the layer can be repainted when data is received.

Parameters:
    URL - the URL to use to obtain data
    DataSetType - optional data set type (GeoJSON is the default)