more marker function

This commit is contained in:
Swrup 2022-11-24 19:22:18 +01:00
parent 96f1839680
commit d0c4f09b11
2 changed files with 70 additions and 25 deletions

View file

@ -62,6 +62,13 @@ type geojson_opt =
(** [create_geojson geojson] is a new geojson layer *)
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
{:https://wiki.openstreetmap.org/wiki/Tile_servers} *)
val create_tile_osm : string option -> [ `Tile ] t
(** Marker layers *)
(** type for marker option, used to create marker *)
@ -83,9 +90,20 @@ type marker_opt =
[latlng] and with options set to [options] *)
val create_marker : Latlng.t -> marker_opt list -> [ `Marker ] t
(** Tile layers *)
(** Returns the current geographical position of the marker. *)
val get_latlng : [ `Marker ] t -> Latlng.t
(** [create_tile_osm Some(url)] is a new tile layer with tile server specified
by [url]. Tile server default to [openstreetmap.org]. See
{:https://wiki.openstreetmap.org/wiki/Tile_servers} *)
val create_tile_osm : string option -> [ `Tile ] t
(** Changes the marker position to the given point. *)
val set_latlng : Latlng.t -> [ `Marker ] t -> unit
(** Changes the zIndex offset of the marker. *)
val set_z_index_offset : int -> [ `Marker ] t -> unit
(** Returns the current icon used by the marker *)
val get_icon : [ `Marker ] t -> Icon.t
(** Changes the marker icon. *)
val set_icon : Icon.t -> [ `Marker ] t -> unit
(** Changes the opacity of the marker. *)
val set_opacity : int -> [ `Marker ] t -> unit