add places
Some checks failed
build / build (push) Failing after 1m2s

This commit is contained in:
zapashcanon 2025-05-22 19:02:52 +02:00
parent e0fa62b481
commit 84ccb548e6
Signed by: zapashcanon
GPG Key ID: 8981C3C62D1D28F1
3 changed files with 61 additions and 1 deletions

View File

@ -48,6 +48,8 @@ let controller request =
; txt request ~fr:"Hôtel" ~en:"Hotel"
; mk_opt "include_bookshop"
; txt request ~fr:"Librairie" ~en:"Bookshop"
; mk_opt "include_clothes_shop"
; txt request ~fr:"Magasin de vêtements" ~en:"Clothes Shop"
]
in
let body = options @ [ div ~a:[ a_id "map" ] [] ] in

View File

@ -538,6 +538,55 @@ marker {
kind restaurant
}
marker {
lat 31.630679
lng -7.984515
content "Priscilla Queen of the Medina"
kind hotel
}
marker {
lat 37.386017
lng -5.988249
content "Hotel Patio de las Cruces"
kind hotel
}
marker {
lat 37.385460
lng -5.986453
content "La Gorda de los Jardines"
kind restaurant
}
marker {
lat 37.385986
lng -5.989349
content "Las Teresas"
kind restaurant
}
marker {
lat 36.013043
lng -5.604333
content "Alma libre Tarifa"
kind clothes_shop
}
marker {
lat 48.838041
lng 2.397096
content "Tucked"
kind clothes_shop
}
marker {
lat 48.844682
lng 2.410107
content "VetiWork"
kind clothes_shop
}
polyline {
content "Coulée verte René-Dumont"
point {

View File

@ -49,6 +49,7 @@ type kind =
; record_store : bool
; hotel : bool
; bookshop : bool
; clothes_shop : bool
}
let empty_kind =
@ -71,6 +72,7 @@ let empty_kind =
; record_store = false
; hotel = false
; bookshop = false
; clothes_shop = false
}
let kind_of_dir dir =
@ -101,6 +103,7 @@ let kind_of_dir dir =
| "record_store" -> { kind with record_store = true }
| "hotel" -> { kind with hotel = true }
| "bookshop" -> { kind with bookshop = true }
| "clothes_shop" -> { kind with clothes_shop = true }
| "ignore" -> kind
| s ->
Format.eprintf "unhandled place kind: %S" s;
@ -198,6 +201,8 @@ let button_include_hotel = get_button "include_hotel"
let button_include_bookshop = get_button "include_bookshop"
let button_include_clothes_shop = get_button "include_clothes_shop"
let is_checked button = El.prop (El.Prop.bool (Jstr.v "checked")) button
let must_be_included
@ -220,6 +225,7 @@ let must_be_included
; farm
; hotel
; bookshop
; clothes_shop
} =
let include_bar = is_checked button_include_bar in
let include_restaurant = is_checked button_include_restaurant in
@ -240,6 +246,7 @@ let must_be_included
let include_record_store = is_checked button_include_record_store in
let include_hotel = is_checked button_include_hotel in
let include_bookshop = is_checked button_include_bookshop in
let include_clothes_shop = is_checked button_include_clothes_shop in
(include_bar && bar)
|| (include_restaurant && restaurant)
|| (include_poetry && poetry) || (include_union && union)
@ -257,6 +264,7 @@ let must_be_included
|| (include_record_store && record_store)
|| (include_hotel && hotel)
|| (include_bookshop && bookshop)
|| (include_clothes_shop && clothes_shop)
let add_marker { kind; marker } =
if must_be_included kind then
@ -305,7 +313,8 @@ let () =
listen_button button_include_cheese_shop;
listen_button button_include_record_store;
listen_button button_include_hotel;
listen_button button_include_bookshop
listen_button button_include_bookshop;
listen_button button_include_clothes_shop
let popup_with_coord e : unit =
let latlng = Event.latlng e in