You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-5Lines changed: 38 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ new GeoRasterLayer({ georaster }).addTo(map);
51
51
52
52
## The GeoRasterLayer Class
53
53
54
-
A custom class for rendering GeoTIFF's (including COG's) on a leaflet map. The layer extends L.GridLayer, see the [docs](https://leafletjs.com/reference-1.7.1.html#gridlayer) for inherited options and methods.
54
+
A custom class for rendering GeoTIFF's (including COG's) on a leaflet map. The layer extends L.GridLayer, see the [docs](https://leafletjs.com/reference.html#gridlayer) for inherited options and methods.
| georaster | GeoRaster | | Use `georaster` from georaster-library. `georaster` or `georasters` is required. |
114
+
| georasters | GeoRaster[] | | Use different `georasters` from georaster-library. `georaster` or `georasters` is required. |
115
+
| resolution | number | 32 | The resolution parameter is how many samples to take across and down from a dataset for each map tile. Typical tiles are 256 x 256 pixels (higher resolution are 512 x 512) which would be a optimal resolution of 256. It's not recommended to set the resolution higher then 512. |
116
+
| debugLevel | number | 0 | Available debug levels: 0 - 5 |
117
+
| pixelValuesToColorFn | (values: number[]) => string | null | Customize how values for a pixel are translated to a color. |
| mask | string \| Feature \| FeatureCollection \| Polygon \| MultiPolygon | null | You can hide all the pixels either inside or outside a given mask geometry. You can provide a JSON object as a mask geometry or a URL to a GeoJSON. |
122
+
| mask_srs | string \| number | "EPSG:4326" | Default mask srs is the EPSG:4326 projection used by GeoJSON |
| updateColors(pixelValuesToColorFn, options) | this | Causes the tiles to redraw without clearing them first. It uses the updated `pixelValuesToColorFn` function. You can set a debugLevel specific to this function by passing in an options object with a debugLevel property. For example, you can turn on the console debugs for this method by setting `debugLevel =1` in the options (even if you created the layer with `debugLevel =0`). |
| getBounds() | LatLngBounds | Returns the bounds of the layer |
138
+
| getMap() | Map | Returns the map which contains the layer |
139
+
| getMapCRS() | CRS | Returns map CRS if available else EPSG3857 |
140
+
| getColor(values: number[]) | string \| undefined | Returns the colors of the values |
141
+
| updateColors(pixelValuesToColorFn, options = { debugLevel: -1 }) | this | Causes the tiles to redraw without clearing them first. It uses the updated `pixelValuesToColorFn` function. You can set a debugLevel specific to this function by passing in an options object with a debugLevel property. For example, you can turn on the console debugs for this method by setting `debugLevel =1` in the options (even if you created the layer with `debugLevel =0`). |
142
+
| getTiles() | Tile[] | Returns tiles as array |
143
+
| getActiveTiles() | Tile[] | Returns active / visible tiles as array |
144
+
| isSupportedProjection() | boolean | Returns if the projection is supported |
145
+
| getProjectionString(projection: number) | string | Returns the projection string for example "EPSG:3857" |
146
+
| getProjector() | Projection | Returns the current projection |
0 commit comments