-
Notifications
You must be signed in to change notification settings - Fork 6
/
googlemaps.mli
3757 lines (3525 loc) · 114 KB
/
googlemaps.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
type travel_mode =
| Driving [@js "DRIVING"]
| Walking [@js "WALKING"]
| Bicycling [@js "BICYCLING"]
| Transit [@js "TRANSIT"]
[@@ js.enum]
type symbol_path =
| Circle [@js 0]
| Forward_closed_arrow [@js 1]
| Forward_open_arrow [@js 2]
| Backward_closed_arrow [@js 3]
| Backward_open_arrow [@js 4]
[@@ js.enum]
type animation =
| Bounce [@js 1]
| Drop [@js 2]
| Nr [@js 3]
| Lr [@js 4]
[@@ js.enum]
type map_types =
| Roadmap [@js "roadmap"]
| Satellite [@js "satellite"]
| Hybrid [@js "hybrid"]
| Terrain [@js "terrain"]
[@@js.enum]
type geocoder_location_type =
| Approximate [@js "APPROXIMATE"]
| Geometric_center [@js "GEOMETRIC_CENTER"]
| Range_interpolated [@js "RANGE_INTERPOLATED"]
| Rooftop [@js "ROOFTOP"]
[@@js.enum]
type geocoder_status =
| Error [@js "ERROR"]
| Invalid_request [@js "INVALID_REQUEST"]
| Ok [@js "OK"]
| Over_query_limit [@js "OVER_QUERY_LIMIT"]
| Request_denied [@js "REQUEST_DENIED"]
| Unknown_error [@js "UNKNOWN_ERROR"]
| Zero_results [@js "ZERO_RESULTS"]
[@@js.enum]
type control_position =
| Bottom [@js 11]
| Bottom_left [@js 10]
| Bottom_right [@js 12]
| Center [@js 13]
| Left [@js 5]
| Left_bottom [@js 6]
| Left_center [@js 4]
| Right [@js 7]
| Right_bottom [@js 9]
| Right_center [@js 8]
| Top [@js 2]
| Top_left [@js 1]
| Top_right [@js 3]
[@@js.enum]
type overlay_type =
| Marker [@js "marker"]
| Polygon [@js "polygon"]
| Polyline [@js "polyline"]
| Rectangle [@js "rectangle"]
| Circle [@js "circle"]
[@@js.enum]
type stroke_position =
| Center [@js 0]
| Inside [@js 1]
| Outside [@js 2]
[@@js.enum]
module VehicleType: sig
(* SUM TYPE *)
type t
end
type map_type_control_style =
| Default [@js 0]
| Horizontal_bar [@js 1]
| Dropdown_menu [@js 2]
| Inset [@js 3]
| Inset_large [@js 4]
[@@ js.enum]
module MVCObject: sig
type t
val new_MVC_object : unit -> t [@@js.new]
val changed : t -> string -> unit [@@js.call]
val get : t -> string -> Ojs.t [@@js.call]
val notify : t -> string -> unit [@@js.call]
val set : t -> string -> Ojs.t -> unit [@@js.call]
val set_values : t -> Ojs.t -> unit [@@js.call]
val unbind : t -> string [@@js.call]
val unbind_all : t -> unit [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module MVCArray: sig
type t
val new_MVC_array : ?array:Ojs.t list -> unit -> t [@@js.new]
val clear : t -> unit [@@js.call]
val for_each : t -> (Ojs.t -> int) -> unit [@@js.call]
val get_array : t -> Ojs.t list [@@js.call]
val get_at : t -> int -> Ojs.t [@@js.call]
val get_length : t -> int [@@js.call]
val insert_at : t -> int -> Ojs.t [@@js.call]
val pop : t -> Ojs.t [@@js.call]
val push : t -> Ojs.t -> int [@@js.call]
val remove_at : t -> int -> Ojs.t [@@js.call]
val set_at : t -> int -> Ojs.t -> unit [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module MapsEventListener: sig
type t
val new_maps_event_listener : unit -> t [@@js.new]
val remove : t -> unit [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module Attribution: sig
type t
val create :
?ios_deep_link_id:string ->
?source:string ->
?web_url:string ->
unit -> t
[@@js.builder]
val ios_deep_link_id: t -> string [@@js.get]
val source: t -> string [@@js.get]
val web_url: t -> string [@@js.get]
val set_ios_deep_link_id: t -> string -> unit [@@js.set]
val set_source: t -> string -> unit [@@js.set]
val set_web_url: t -> string -> unit [@@js.set]
end
module LatLng: sig
type t
val new_lat_lng: lat:float -> lng:float -> t [@@js.new]
val lat: t -> float [@@js.call]
val lng: t -> float [@@js.call]
(** Unsafe **)
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
end
[@js.scope "maps"][@js.scope "google"]
module LatLngBounds: sig
type t
val new_lat_lng_bounds: sw:LatLng.t -> ne:LatLng.t -> t [@@js.new]
val contains: t -> LatLng.t -> bool [@@js.call]
val equals: t -> LatLng.t -> bool [@@js.call]
val extend: t -> LatLng.t -> t [@@js.call]
val get_center: t -> unit -> LatLng.t [@@js.call]
val get_north_east: t -> unit -> LatLng.t [@@js.call]
val get_south_west: t -> unit -> LatLng.t [@@js.call]
val intersects: t -> t -> bool [@@js.call]
val is_empty: t -> unit -> bool [@@js.call]
val to_string: t -> unit -> string [@@js.call]
val union: t -> t -> t [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module Point: sig
type t
val new_point : x:float -> y:float -> t [@@js.new]
val equals : t -> t -> bool [@@js.call]
val x : t -> float [@@js.get]
val y : t -> float [@@js.get]
val set_x : t -> float -> unit [@@js.set]
val set_y : t -> float -> unit [@@js.set]
end
[@js.scope "maps"][@js.scope "google"]
module Size: sig
type t
val new_size :
width:float ->
height:float ->
?width_unit:string ->
?height_unit:string ->
unit ->
t [@@js.new]
val equals : t -> t -> bool [@@js.call]
val to_string : t -> string [@@js.call]
val height : t -> float [@@js.get]
val width : t -> float [@@js.get]
val set_height : t -> float -> unit [@@js.set]
val set_width : t -> float -> unit [@@js.set]
end
[@js.scope "maps"][@js.scope "google"]
module Icon: sig
type t
val create:
?anchor:Point.t ->
?label_origin:Point.t ->
?origin:Point.t ->
?scaled_size:Size.t ->
?size:Size.t ->
?url:string ->
unit ->
t
[@@js.builder]
val anchor: t -> Point.t [@@js.get]
val label_origin: t -> Point.t [@@js.get]
val origin: t -> Point.t [@@js.get]
val scaled_size: t -> Size.t [@@js.get]
val size: t -> Size.t [@@js.get]
val url: t -> string [@@js.get]
val set_anchor: t -> Point.t -> unit [@@js.set]
val set_label_origin: t -> Point.t -> unit [@@js.set]
val set_origin: t -> Point.t -> unit [@@js.set]
val set_scaled_size: t -> Size.t -> unit [@@js.set]
val set_size: t -> Size.t -> unit [@@js.set]
val set_url: t -> string -> unit [@@js.set]
end
module Projection: sig
type t
val from_lat_lng_to_point : t -> LatLng.t -> Point.t
val from_point_to_lat_lng : t -> Point.t -> LatLng.t
end
[@js.scope "maps"][@js.scope "google"]
(* Map *)
(* Zoom *)
module ZoomControlOptions: sig
type t
val create:
position:control_position ->
t
[@@js.builder]
val position: t -> control_position [@@js.get]
val set_position: t -> control_position -> unit [@@js.set]
end
(* End zoom *)
(* Fullscreen *)
module FullscreenControlOptions: sig
type t
val create:
position:control_position ->
t
[@@js.builder]
val position: t -> control_position [@@js.get]
val set_position: t -> control_position -> unit [@@js.set]
end
(* End Fullscreen *)
(* Streetview *)
module StreetViewAddressControlOptions: sig
type t
val create:
position:control_position ->
t
[@@js.builder]
val position: t -> control_position [@@js.get]
val set_position: t -> control_position -> unit [@@js.set]
end
module StreetViewControlOptions: sig
type t
val create:
position:control_position ->
t
[@@js.builder]
val position: t -> control_position [@@js.get]
val set_position: t -> control_position -> unit [@@js.set]
end
module StreetViewLink: sig
type t
val create:
?description:string ->
?heading:int ->
?pano:string ->
unit ->
t
[@@js.builder]
val description: t -> string [@@js.get]
val heading: t -> int [@@js.get]
val pano: t -> string [@@js.get]
val set_description: t -> string -> unit [@@js.set]
val set_heading: t -> int -> unit [@@js.set]
val set_pano: t -> string -> unit [@@js.set]
end
type street_view_preference =
| Nearest [@js "nearest"]
| Best [@js "best"]
[@@ js.enum]
type street_view_status =
| Ok [@js "OK"]
| Unknown_error [@js "UNKNOWN_ERROR"]
| Zero_results [@js "ZERO_RESULTS"]
[@@ js.enum]
type street_view_source =
| Default [@js "default"]
| Outdoor [@js "outdoor"]
[@@ js.enum]
module StreetViewLocation: sig
type t
val create:
?description:string ->
?lat_lng:LatLng.t ->
?pano:string ->
short_description:string ->
unit ->
t
[@@js.builder]
val description: t -> string [@@js.get]
val lat_lng: t -> LatLng.t [@@js.get]
val pano: t -> string [@@js.get]
val short_description: t -> string [@@js.get]
val set_description: t -> string -> unit [@@js.set]
val set_lat_lng: t -> LatLng.t -> unit [@@js.set]
val set_pano: t -> string -> unit [@@js.set]
val set_short_description: t -> string -> unit [@@js.set]
end
module StreetViewTileData: sig
type t
val new_street_view_tile_data: unit -> t [@@js.new]
val get_tile_url:
t ->
pano:string ->
tile_zoom:int ->
tile_x:int ->
tile_y:int ->
string
[@@js.call]
val center_heading : t -> float [@@js.get]
val tile_size : t -> Size.t [@@js.get]
val world_size : t -> Size.t [@@js.get]
val set_center_heading : t -> float -> unit [@@js.set]
val set_tile_size : t -> Size.t -> unit [@@js.set]
val set_world_size : t -> Size.t -> unit [@@js.set]
end
[@js.scope "maps"][@js.scope "google"]
module StreetViewPanoramaData: sig
type t
val create:
?copyright:string ->
?image_data:string ->
?links:StreetViewLink.t list ->
?location:StreetViewLocation.t ->
?tiles:StreetViewTileData.t ->
unit ->
t
[@@js.builder]
val copyright: t -> string [@@js.get]
val image_data: t -> string [@@js.get]
val links: t -> StreetViewLink.t list [@@js.get]
val location: t -> StreetViewLocation.t [@@js.get]
val tiles: t -> StreetViewTileData.t [@@js.get]
val set_copyright: t -> string -> unit [@@js.set]
val set_image_data: t -> string -> unit [@@js.set]
val set_links: t -> StreetViewLink.t list -> unit [@@js.set]
val set_location: t -> StreetViewLocation.t -> unit [@@js.set]
val set_tiles: t -> StreetViewTileData.t -> unit [@@js.set]
end
module StreetViewLocationRequest: sig
type t
val create:
?location:LatLng.t ->
?preference:street_view_preference ->
?radius:float ->
?source:street_view_source ->
unit ->
t
[@@js.builder]
val location: t -> LatLng.t [@@js.get]
val preference: t -> street_view_preference [@@js.get]
val radius: t -> float [@@js.get]
val source: t -> street_view_source [@@js.get]
val set_location: t -> LatLng.t -> unit [@@js.set]
val set_preference: t -> street_view_preference -> unit [@@js.set]
val set_radius: t -> float -> unit [@@js.set]
val set_source: t -> street_view_source -> unit [@@js.set]
end
module StreetViewPanoRequest: sig
type t
val create:
pano:string ->
t
[@@js.builder]
val pano: t -> string [@@js.get]
val set_pano: t -> string -> unit [@@js.set]
end
module StreetViewService: sig
type t
val new_street_view_service:
unit -> t [@@js.new]
val get_panorama:
StreetViewLocationRequest.t ->
(StreetViewPanoramaData.t ->
street_view_status ->
unit) ->
unit
val get_panorama_panorequest:
StreetViewPanoRequest.t ->
(StreetViewPanoramaData.t ->
street_view_status ->
unit) ->
unit
[@@js.call "getPanorama"]
end
[@js.scope "maps"][@js.scope "google"]
module PanControlOptions: sig
type t
val create:
position:control_position ->
t
[@@js.builder]
val position: t -> control_position [@@js.get]
val set_position: t -> control_position -> unit [@@js.set]
end
module StreetViewPov: sig
type t
val create:
heading:int ->
pitch:int ->
t
[@@js.builder]
val heading: t -> int [@@js.get]
val pitch: t -> int [@@js.get]
val set_heading: t -> int -> unit [@@js.set]
val set_pitch: t -> int -> unit [@@js.set]
end
module StreetViewPanoramaOptions: sig
type t
val create:
?address_control:bool ->
?address_control_options:StreetViewAddressControlOptions.t ->
?click_to_go:bool ->
?disable_default_u_i:bool ->
?disable_double_click_zoom:bool ->
?enable_close_button:bool ->
?fullscreen_control:bool ->
?fullscreen_control_options:FullscreenControlOptions.t ->
?image_date_control:bool ->
?links_control:bool ->
?pan_control:bool ->
?pan_control_options:PanControlOptions.t ->
?pano:string ->
?pano_provider:(string->StreetViewPanoramaData.t) ->
?position:LatLng.t ->
?pov:StreetViewPov.t ->
?scrollwheel:bool ->
?visible:bool ->
?zoom_control:bool ->
?zoom_control_options:ZoomControlOptions.t ->
unit ->
t
[@@js.builder]
val address_control: t -> bool [@@js.get]
val address_control_options: t -> StreetViewAddressControlOptions.t [@@js.get]
val click_to_go: t -> bool [@@js.get]
val disable_default_u_i: t -> bool [@@js.get]
val disable_double_click_zoom: t -> bool [@@js.get]
val enable_close_button: t -> bool [@@js.get]
val fullscreen_control: t -> bool [@@js.get]
val fullscreen_control_options: t -> FullscreenControlOptions.t [@@js.get]
val image_date_control: t -> bool [@@js.get]
val links_control: t -> bool [@@js.get]
val pan_control: t -> bool [@@js.get]
val pan_control_options: t -> PanControlOptions.t [@@js.get]
val pano: t -> string [@@js.get]
(* val pano_provider: t -> (string->StreetViewPanoramaData.t) [@@js.get]*)
val position: t -> LatLng.t [@@js.get]
val pov: t -> StreetViewPov.t [@@js.get]
val scrollwheel: t -> bool [@@js.get]
val visible: t -> bool [@@js.get]
val zoom_control: t -> bool [@@js.get]
val zoom_control_options: t -> ZoomControlOptions.t [@@js.get]
val set_address_control: t -> bool -> unit [@@js.set]
val set_address_control_options:
t -> StreetViewAddressControlOptions.t -> unit [@@js.set]
val set_click_to_go: t -> bool -> unit [@@js.set]
val set_disable_default_u_i: t -> bool -> unit [@@js.set]
val set_disable_double_click_zoom: t -> bool -> unit [@@js.set]
val set_enable_close_button: t -> bool -> unit [@@js.set]
val set_fullscreen_control: t -> bool -> unit [@@js.set]
val set_fullscreen_control_options:
t -> FullscreenControlOptions.t -> unit [@@js.set]
val set_image_date_control: t -> bool -> unit [@@js.set]
val set_links_control: t -> bool -> unit [@@js.set]
val set_pan_control: t -> bool -> unit [@@js.set]
val set_pan_control_options: t -> PanControlOptions.t -> unit [@@js.set]
val set_pano: t -> string -> unit [@@js.set]
val set_pano_provider:
t -> (string->StreetViewPanoramaData.t) -> unit [@@js.set]
val set_position: t -> LatLng.t -> unit [@@js.set]
val set_pov: t -> StreetViewPov.t -> unit [@@js.set]
val set_scrollwheel: t -> bool -> unit [@@js.set]
val set_visible: t -> bool -> unit [@@js.set]
val set_zoom_control: t -> bool -> unit [@@js.set]
val set_zoom_control_options: t -> ZoomControlOptions.t -> unit [@@js.set]
end
module StreetViewPanorama: sig
type t
val new_street_view_panorama:
container:Converter.Element.t ->
?opts:StreetViewPanoramaOptions.t ->
unit ->
t [@@js.new]
val get_links: t -> StreetViewLink.t list [@@js.call]
val get_location: t -> StreetViewLocation.t [@@js.call]
val get_pano: t -> string [@@js.call]
val get_photographer_pov: t -> StreetViewPov.t [@@js.call]
val get_position: t -> LatLng.t [@@js.call]
val get_pov: t -> StreetViewPov.t [@@js.call]
val get_status: t -> street_view_status [@@js.call]
val get_visible: t -> bool [@@js.call]
val get_zoom: t -> int [@@js.call]
val register_pano_provider:
(string->StreetViewPanoramaData.t) -> unit [@@js.call]
val set_links: t -> StreetViewLink.t list -> unit [@@js.call]
val set_options:
t -> StreetViewPanoramaOptions.t -> unit [@@js.call]
val set_pano: t -> string -> unit [@@js.call]
val set_position: t -> LatLng.t -> unit [@@js.call]
val set_pov: t -> StreetViewPov.t -> unit [@@js.call]
val set_visible: t -> bool -> unit [@@js.call]
val set_zoom: t -> int -> unit [@@js.call]
val controls : t -> MVCArray.t list [@@js.get]
val set_controls : t -> MVCArray.t list -> unit [@@js.set]
end
[@js.scope "maps"][@js.scope "google"]
(* End streetview *)
(* Data *)
module Data: sig
(* type styling_function = Feature.t -> StyleOptions.t *)
module Geometry: sig
type t
(* val get_type: t -> string [@@js.call] *)
end
module Polygon: sig
type t
val new_polygon : LatLng.t list list -> t
[@@js.new]
end
[@js.scope "Data"][@js.scope "maps"][@js.scope "google"]
val geometry_of_polygon: Polygon.t -> Geometry.t [@@js.cast]
module FeatureOptions : sig
type t
val create : ?geometry:Geometry.t -> unit -> t
[@@js.builder]
end
module Feature : sig
type t
val new_feature : ?options:FeatureOptions.t -> unit -> t
[@@js.new]
end
[@js.scope "Data"][@js.scope "maps"][@js.scope "google"]
(* module DataOptions: sig *)
(* type t *)
(* val create: *)
(* ?control_position:control_position -> *)
(* ?controls:string list -> *)
(* ?drawing_mode:string -> *)
(* ?feature_factory:(Geometry.t -> Feature.t) -> *)
(* ?map:Map.t -> *)
(* ?style:styling_function -> *)
(* unit -> *)
(* t *)
(* [@@js.builder] *)
(* end *)
type t
(* val new_data: ?opts:DataOptions.t -> t [@@js.new] *)
val add: t -> ?feature:Feature.t -> unit -> Feature.t [@@js.call]
end
(* End data *)
module MapTypeControlOptions: sig
type t
val create:
?map_type_ids:map_types list ->
?position:control_position ->
?style:map_type_control_style ->
unit ->
t
[@@js.builder]
val map_type_ids: t -> map_types list [@@js.get]
val position: t -> control_position [@@js.get]
val style: t -> map_type_control_style [@@js.get]
val set_map_type_ids: t -> map_types list -> unit [@@js.set]
val set_position: t -> control_position -> unit [@@js.set]
val set_style: t -> map_type_control_style -> unit [@@js.set]
end
module MapTypeStyler: sig
type t
val create:
?color:string ->
?gamma:float ->
?hue:string ->
?invert_lightness:bool ->
?lightness:float ->
?saturation:float ->
?visibility:string ->
?weight:int ->
unit ->
t
[@@js.builder]
val color: t -> string [@@js.get]
val gamma: t -> float [@@js.get]
val hue: t -> string [@@js.get]
val invert_lightness: t -> bool [@@js.get]
val lightness: t -> float [@@js.get]
val saturation: t -> float [@@js.get]
val visibility: t -> string [@@js.get]
val weight: t -> int [@@js.get]
val set_color: t -> string -> unit [@@js.set]
val set_gamma: t -> float -> unit [@@js.set]
val set_hue: t -> string -> unit [@@js.set]
val set_invert_lightness: t -> bool -> unit [@@js.set]
val set_lightness: t -> float -> unit [@@js.set]
val set_saturation: t -> float -> unit [@@js.set]
val set_visibility: t -> string -> unit [@@js.set]
val set_weight: t -> int -> unit [@@js.set]
end
module MapTypeStyleElementType: sig
type t =
| All [@js "all"]
| Geometry [@js "geometry"]
| Geometry_fill [@js "geometry.fill"]
| Geometry_stroke [@js "geometry.stroke"]
| Labels [@js "labels"]
| Labels_icon [@js "labels.icon"]
| Labels_text [@js "labels.text"]
| Labels_text_fill [@js "labels.text.fill"]
| Labels_text_stroke [@js "labels.text.stroke"]
[@@ js.enum]
end
module MapTypeStyleFeatureType: sig
type t =
| All [@js "all"]
| Administrative [@js "administrative"]
| Administrative_country [@js "administrative.country"]
| Administrative_landparcel [@js "administrative.land_parcel"]
| Administrative_locality [@js "administrative.locality"]
| Administrative_neighborhood [@js "administrative.neighborhood"]
| Administrative_province [@js "administrative.province"]
| Landscape [@js "landscape"]
| Landscape_manmade [@js "landscape.man_made"]
| Landscape_natural [@js "landscape.natural"]
| Landscape_natural_landcover [@js "landscape.natural.landcover"]
| Landscape_natural_terrain [@js "landscape.natural.terrain"]
| Poi [@js "poi"]
| Poi_attraction [@js "poi.attraction"]
| Poi_business [@js "poi.business"]
| Poi_government [@js "poi.government"]
| Poi_medical [@js "poi.medical"]
| Poi_park [@js "poi.park"]
| Poi_placeofworship [@js "poi.place_of_worship"]
| Poi_school [@js "poi.school"]
| Poi_sportscomplex [@js "poi.sports_complex"]
| Road [@js "road"]
| Road_arterial [@js "road.arterial"]
| Road_highway [@js "road.highway"]
| Road_highway_controlledaccess [@js "road.highway.controlled_access"]
| Road_local [@js "road.local"]
| Transit [@js "transit"]
| Transit_line [@js "transit.line"]
| Transit_station [@js "transit.station"]
| Transit_station_airport [@js "transit.station.airport"]
| Transit_station_bus [@js "transit.station.bus"]
| Transit_station_rail [@js "transit.station.rail"]
| Water [@js "water"]
[@@ js.enum]
end
module MapTypeStyle: sig
type t
val create:
?element_type:MapTypeStyleElementType.t ->
?feature_type:MapTypeStyleFeatureType.t ->
?stylers:MapTypeStyler.t list ->
unit ->
t
[@@js.builder]
val element_type: t -> MapTypeStyleElementType.t [@@js.get]
val feature_type: t -> MapTypeStyleFeatureType.t [@@js.get]
val stylers: t -> MapTypeStyler.t list [@@js.get]
val set_element_type:
t -> MapTypeStyleElementType.t -> unit [@@js.set]
val set_feature_type:
t -> MapTypeStyleFeatureType.t -> unit [@@js.set]
val set_stylers: t -> MapTypeStyler.t list -> unit [@@js.set]
end
module MapType: sig
type t
val new_map_type: unit -> t [@@js.new]
val get_tile:
t ->
tile_coord:Point.t ->
zoom:int ->
Converter.Element.t ->
unit [@@js.call]
(** Node **)
val release_tile: t -> Ojs.t -> unit [@@js.call]
val alt : t -> string [@@js.get]
val max_zoom : t -> int [@@js.get]
val min_zoom : t -> int [@@js.get]
val name : t -> string [@@js.get]
val projection : t -> Projection.t [@@js.get]
val radius : t -> float [@@js.get]
val tile_size : t -> Size.t [@@js.get]
val set_alt : t -> string -> unit [@@js.set]
val set_max_zoom : t -> int -> unit [@@js.set]
val set_min_zoom : t -> int -> unit [@@js.set]
val set_name : t -> string -> unit [@@js.set]
val set_projection : t -> Projection.t -> unit [@@js.set]
val set_radius : t -> float -> unit [@@js.set]
val set_tile_size : t -> Size.t -> unit [@@js.set]
end
[@js.scope "maps"][@js.scope "google"]
module MapOptions: sig
type t
val create :
?background_color:string ->
?center:LatLng.t ->
?clickable_icons:bool ->
?disable_double_click_zoom:bool ->
?draggable:bool ->
?draggable_cursor:string ->
?dragging_cursor:string ->
?fullscreen_control:bool ->
?gesture_handling:string ->
?heading:float ->
?keyboard_shortcuts:bool ->
?map_maker:bool ->
?map_type_control:bool ->
?map_type_control_options:MapTypeControlOptions.t ->
?map_type_id:map_types ->
?max_zoom:int ->
?min_zoom:int ->
?no_clear:bool ->
?pan_control:bool ->
?rotate_control:bool ->
?scale_control:bool ->
?scrollwheel:bool ->
?sign_in_control:bool ->
?street_view_control:bool ->
?styles:MapTypeStyle.t list ->
?tilt:float ->
?zoom:int ->
?zoom_control:bool ->
?zoom_control_options:ZoomControlOptions.t ->
unit ->
t
[@@js.builder]
val background_color: t -> string [@@js.get]
val center: t -> LatLng.t [@@js.get]
val clickable_icons: t -> bool [@@js.get]
val disable_double_click_zoom: t -> bool [@@js.get]
val draggable: t -> bool [@@js.get]
val draggable_cursor: t -> string [@@js.get]
val dragging_cursor: t -> string [@@js.get]
val fullscreen_control: t -> bool [@@js.get]
val gesture_handling: t -> string [@@js.get]
val heading: t -> float [@@js.get]
val keyboard_shortcuts: t -> bool [@@js.get]
val map_maker: t -> bool [@@js.get]
val map_type_control: t -> bool [@@js.get]
val map_type_control_options: t -> MapTypeControlOptions.t [@@js.get]
val map_type_id: t -> map_types [@@js.get]
val max_zoom: t -> int [@@js.get]
val min_zoom: t -> int [@@js.get]
val no_clear: t -> bool [@@js.get]
val pan_control: t -> bool [@@js.get]
val rotate_control: t -> bool [@@js.get]
val scale_control: t -> bool [@@js.get]
val scrollwheel: t -> bool [@@js.get]
val sign_in_control: t -> bool [@@js.get]
val street_view_control: t -> bool [@@js.get]
val tilt: t -> float [@@js.get]
val zoom: t -> int [@@js.get]
val zoom_control: t -> bool [@@js.get]
val zoom_control_options: t -> ZoomControlOptions.t [@@js.get]
val set_background_color: t -> string -> unit [@@js.set]
val set_center: t -> LatLng.t -> unit [@@js.set]
val set_clickable_icons: t -> bool -> unit [@@js.set]
val set_disable_double_click_zoom: t -> bool -> unit [@@js.set]
val set_draggable: t -> bool -> unit [@@js.set]
val set_draggable_cursor: t -> string -> unit [@@js.set]
val set_dragging_cursor: t -> string -> unit [@@js.set]
val set_fullscreen_control: t -> bool -> unit [@@js.set]
val set_gesture_handling: t -> string -> unit [@@js.set]
val set_heading: t -> float -> unit [@@js.set]
val set_keyboard_shortcuts: t -> bool -> unit [@@js.set]
val set_map_maker: t -> bool -> unit [@@js.set]
val set_map_type_control: t -> bool -> unit [@@js.set]
val set_map_type_control_options: t -> MapTypeControlOptions.t -> unit [@@js.set]
val set_map_type_id: t -> map_types -> unit [@@js.set]
val set_max_zoom: t -> int -> unit [@@js.set]
val set_min_zoom: t -> int -> unit [@@js.set]
val set_no_clear: t -> bool -> unit [@@js.set]
val set_pan_control: t -> bool -> unit [@@js.set]
val set_rotate_control: t -> bool -> unit [@@js.set]
val set_scale_control: t -> bool -> unit [@@js.set]
val set_scrollwheel: t -> bool -> unit [@@js.set]
val set_sign_in_control: t -> bool -> unit [@@js.set]
val set_street_view_control: t -> bool -> unit [@@js.set]
val set_tilt: t -> float -> unit [@@js.set]
val set_zoom: t -> int -> unit [@@js.set]
val set_zoom_control: t -> bool -> unit [@@js.set]
val set_zoom_control_options: t -> ZoomControlOptions.t -> unit [@@js.set]
end
module MapTypeRegistry: sig
type t
val new_map_type_registry: unit -> t [@@js.new]
val set: t -> id:string -> map_type:map_types option -> unit [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module Map: sig
type t
val new_map :
Converter.Element.t ->
?opts:MapOptions.t -> unit -> t [@@js.new]
val add_listener : t -> string -> (unit -> unit) -> MapsEventListener.t
[@@js.call]
[@@@js.stop]
val bounds_changed : t -> (unit -> unit) -> MapsEventListener.t
val center_changed : t -> (unit -> unit) -> MapsEventListener.t
[@@@js.start]
[@@@js.implem
let bounds_changed t fn = add_listener t "bounds_changed" fn
let center_changed t fn = add_listener t "center_changed" fn
]
val fit_bounds : t -> LatLngBounds.t -> unit [@@js.call]
val get_bounds : t -> LatLngBounds.t [@@js.call]
val get_center : t -> LatLng.t [@@js.call]
val get_clickable_icons : t -> bool [@@js.call]
val set_map_type_id : t -> map_types -> unit [@@js.call]
val set_map_type_id_string : t -> string -> unit [@@js.call "setMapTypeId"]
val get_map_type_id : t -> map_types [@@js.call]
val get_div : t -> Converter.Element.t [@@js.call]
val get_heading : t -> float [@@js.call]
val get_projection : t -> Projection.t [@@js.call]
val get_tilt : t -> float [@@js.call]
val get_zoom : t -> int [@@js.call]
val pan_by : t -> x:float -> y:float -> unit [@@js.call]
val pan_to : t -> LatLng.t -> unit [@@js.call]
val pan_to_bounds : t -> LatLngBounds.t -> unit [@@js.call]
val set_center : t -> LatLng.t -> unit [@@js.call]
val set_clickable_icons : t -> bool -> unit [@@js.call]
val set_heading : t -> float -> unit [@@js.call]
val set_options : t -> MapOptions.t -> unit [@@js.call]
val set_street_view : t -> StreetViewPanorama.t
val set_tilt : t -> float -> unit [@@js.call]
val set_zoom : t -> int -> unit [@@js.call]
(** Attributes need getter and setter **)
val controls: t -> MVCArray.t list [@@js.get]
val data: t -> Data.t [@@js.get]
val map_types: t -> MapTypeRegistry.t [@@js.get]
val overlay_map_types: t -> MVCArray.t [@@js.get]
val set_controls: t -> MVCArray.t list -> unit [@@js.set]
(* val set_data: t -> Data.t -> unit [@@js.set]*)
val set_map_types: t -> MapTypeRegistry.t -> unit [@@js.set]
val set_overlay_map_types: t -> MVCArray.t -> unit [@@js.set]
(** Added for polymorphism **)
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
end
[@js.scope "maps"][@js.scope "google"]
module StreetViewCoverageLayer: sig
type t
val new_street_view_coverage_layer: unit -> t [@@js.new]
val get_map: t -> Map.t [@@js.call]
val set_map: t -> Map.t -> unit [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module MapCanvasProjection: sig
type t
val new_map_canvas_projection: unit -> t [@@js.new]
val from_container_pixel_to_lat_lng:
t -> Point.t -> ?nowrap:bool -> unit -> LatLng.t [@@js.call]
val from_div_pixel_to_lat_lng:
t -> Point.t -> ?nowrap:bool -> unit -> LatLng.t [@@js.call]
val from_lat_lng_to_container_pixel:
t -> LatLng.t -> Point.t [@@js.call]
val from_lat_lng_to_div_pixel:
t -> LatLng.t -> Point.t [@@js.call]
val get_world_width: t -> int [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
(* End map *)
module BicyclingLayer: sig
type t
val new_bicycling_layer: unit -> t [@@js.new]
val get_map : t -> Map.t [@@js.call]
val set_map : t -> Map.t -> unit [@@js.call]
end
[@js.scope "maps"][@js.scope "google"]
module MarkerLabel: sig
type t
val create :
?color:string ->
?font_family:string ->
?font_size:string -> (*CSS font-size, ex : 14px*)
?font_weight:string ->
?text:string ->
unit -> t [@@js.builder]
val color: t -> string [@@js.get]
val font_family: t -> string [@@js.get]
val font_size: t -> string [@@js.get]
val font_weight: t -> string [@@js.get]
val text: t -> string [@@js.get]
val set_color: t -> string -> unit [@@js.set]
val set_font_family: t -> string -> unit [@@js.set]
val set_font_size: t -> string -> unit [@@js.set]
val set_font_weight: t -> string -> unit [@@js.set]
val set_text: t -> string -> unit [@@js.set]
end
module MarkerPlace: sig
type t
val create :
?location:LatLng.t ->
?place_id:string ->
?query:string ->
unit -> t [@@js.builder]
val location: t -> LatLng.t [@@js.get]
val place_id: t -> string [@@js.get]
val query: t -> string [@@js.get]
val set_location: t -> LatLng.t -> unit [@@js.set]
val set_place_id: t -> string -> unit [@@js.set]
val set_query: t -> string -> unit [@@js.set]
end
module MarkerShape: sig
type t
val create :
?coords:float list ->
?type':(string [@js "type"]) ->
unit ->
t [@@js.builder]
val coords: t -> float list [@@js.get]
val type': t -> string [@@js.get "type"]
val set_coords: t -> float list -> unit [@@js.set]
val set_type': t -> string -> unit [@@js.set "type"]
end
module MarkerOptions: sig
type t
val create :
?anchor_point:Point.t ->
?animation:animation ->
?attribution:Attribution.t ->
?clickable:bool ->
?cross_on_drag:bool ->
?cursor:string ->
?draggable:bool ->