add tile_layer_opt; untested

This commit is contained in:
Swrup 2024-01-29 22:49:31 +01:00
parent 3332d0fb7c
commit ccddd550f9
3 changed files with 78 additions and 19 deletions

View file

@ -64,7 +64,23 @@ val create_geojson : Jv.t -> geojson_opt list -> [ `Geojson ] t
(** Tile layers *)
(** [create_tile_osm Some(url)] is a new tile layer with tile server specified
by [url]. Tile server default to [openstreetmap.org]. See
type tile_layer_opt =
| Min_zoom of int
| Max_zoom of int
| Subdomains of string array
| Error_tile_url of string
| Zoom_offset of int
| Tms of bool
| Zoom_reverse of bool
| Detect_retina of bool
| Cross_origin of bool
| Referrer_policy of bool
(** [create_tile url attribution opts] create a new tile layer *)
val create_tile :
string -> attribution:string -> tile_layer_opt list -> [ `Tile ] t
(** [create_tile_osm opts] create a new tile layer with tile server and
attribution set to [openstreetmap.org]. See
{:https://wiki.openstreetmap.org/wiki/Tile_servers} *)
val create_tile_osm : string option -> [ `Tile ] t
val create_tile_osm : tile_layer_opt list -> [ `Tile ] t