Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
517792e
Merge branch 'main' of https://github.com/getodk/web-forms into selec…
latin-panda Aug 20, 2025
ef0cb3a
Merge branch 'main' of https://github.com/getodk/web-forms into selec…
latin-panda Aug 21, 2025
0cd76eb
engine support for metadata in itemset nodes
latin-panda Aug 25, 2025
68da647
Merge branch 'main' of https://github.com/getodk/web-forms into selec…
latin-panda Aug 27, 2025
16f3cde
Async map bundle loading
latin-panda Aug 28, 2025
66e9764
typing
latin-panda Aug 28, 2025
a7dea73
Map Component
latin-panda Sep 1, 2025
4823ebf
Adds new icons
latin-panda Sep 3, 2025
1e9feec
removes cache buste and timeout
latin-panda Sep 3, 2025
b009dc7
Map UI features: properties popup and status bar
latin-panda Sep 4, 2025
93cc3a8
Merge branch 'main' of https://github.com/getodk/web-forms into selec…
latin-panda Sep 4, 2025
525d890
Merge branch 'select-one-for-map' of https://github.com/getodk/web-fo…
latin-panda Sep 4, 2025
01a4fa5
fixes styles and icons based on feedback
latin-panda Sep 4, 2025
78872b2
Merge branch 'main' of https://github.com/getodk/web-forms into ui-se…
latin-panda Sep 22, 2025
dcf7902
Merge branch 'main' of https://github.com/getodk/web-forms into ui-se…
latin-panda Sep 22, 2025
313e751
Reverts changes in engine. We decided another solution
latin-panda Sep 22, 2025
6c0ab6f
Applies latest designer feedback
latin-panda Sep 23, 2025
4b0a7e4
fixes lint, handles esc key
latin-panda Sep 23, 2025
2467720
Makes lines less thick
latin-panda Sep 23, 2025
294ddd5
stacking errors
latin-panda Sep 23, 2025
a4d3056
Adds map background for full screen
latin-panda Sep 23, 2025
087645f
Adds support for properties in the engine
latin-panda Sep 24, 2025
34ebdb4
Fixes scenario tests
latin-panda Sep 25, 2025
62562bf
Integration engine and client
latin-panda Sep 26, 2025
7ff1896
Refactored component input types and fixed view center when no features
latin-panda Sep 29, 2025
f1494a6
Simplified map ref and source get
latin-panda Sep 29, 2025
c7657c2
Flat and prefixed properties to avoid OL conflicts, fixes polygon cal…
latin-panda Sep 29, 2025
07d288d
fixes click binding for disable question
latin-panda Sep 29, 2025
40b9ea4
fixes lint
latin-panda Sep 29, 2025
d944129
Feedback for async map and properties components
latin-panda Sep 30, 2025
8b9db70
Feedback for useMapBlock
latin-panda Sep 30, 2025
4ec6fbc
Feedback for line's hit tolerance
latin-panda Sep 30, 2025
6ecc1a0
Feedback for line's hit tolerance
latin-panda Sep 30, 2025
84a54a5
Merge branch 'main' of https://github.com/getodk/web-forms into ui-se…
latin-panda Sep 30, 2025
acb419f
changeset
latin-panda Sep 30, 2025
0705a5d
Improves style filters
latin-panda Sep 30, 2025
979ec9d
Feedback - properties popup
latin-panda Oct 1, 2025
61602e3
Feedback - map buttons
latin-panda Oct 1, 2025
99305c0
Remove dummy code
latin-panda Oct 1, 2025
6c3ce11
feedback - remove cursor when map is disabled
latin-panda Oct 1, 2025
8d6b536
feedback - removes watch options, use better function to find features
latin-panda Oct 1, 2025
c669258
feedback - uses shallowRef
latin-panda Oct 1, 2025
11d81ea
feedback - Adds animation to feature center!
latin-panda Oct 1, 2025
eec9229
Feedback - Vertical alignment of popup lines and add zoom to fit all …
latin-panda Oct 1, 2025
40652ac
Fix to match Collect error handling
latin-panda Oct 2, 2025
9992b63
Removes Google Chrome's tap highlight
latin-panda Oct 2, 2025
6cf13f1
QA feedback - Prevent map cloning at low zoom
latin-panda Oct 2, 2025
b4acdd2
feedback
latin-panda Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/four-steaks-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@getodk/xforms-engine': minor
'@getodk/web-forms': minor
'@getodk/scenario': patch
'@getodk/common': patch
---

Support select one from map
10 changes: 10 additions & 0 deletions packages/common/src/fixtures/select/geodataCsv.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name,label,geometry,population_size,num_hospitals
1,Lisbon,38.7 -9.15,500000,120
2,Dublin,53.33 -6.25,1200000,200
3,Edinburgh,55.953251 -3.188267,500000,150
4,Amsterdam-Brussels-Luxembourg,52.37 4.9; 50.85 4.35; 49.6 6.13,3000000,450
5,Zurich-Geneva-Basel,47.3667 8.55; 46.2022 6.1457; 47.55839 7.57327,1500000,300
6,Barcelona-Madrid,41.390205 2.154007; 40.38 -3.7,5000000,600
7,London-Paris-Amsterdam-London,51.5 -0.12; 48.85 2.35; 52.37 4.9; 51.5 -0.12,20000000,1000
8,Berlin-Frankfurt-Munich-Berlin,52.52 13.4; 50.11552 8.68417; 48.13743 11.57549; 52.52 13.4,7000000,800
9,Vienna-Salzburg-Innsbruck-Vienna,48.2 16.37; 47.79941 13.04399; 47.26266 11.39454; 48.2 16.37,3000000,400
251 changes: 251 additions & 0 deletions packages/common/src/fixtures/select/geodataGeoJson.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-73.56,
45.52
]
},
"properties": {
"nurses": 19,
"doctors": 10,
"patients": 390,
"id": "fea-07",
"title": "Chinatown Medical Center"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-73.585,
45.5
]
},
"properties": {
"nurses": 23,
"doctors": 13,
"patients": 550,
"id": "fea-08",
"title": "West End Health Clinic"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-73.555,
45.485
]
},
"properties": {
"nurses": 16,
"doctors": 6,
"patients": 300,
"id": "fea-09",
"title": "Verdun Community Clinic"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-73.59,
45.53
],
[
-73.58,
45.53
],
[
-73.57,
45.53
]
]
},
"properties": {
"id": "fea-018",
"title": "Canada Goose",
"quantities": 4000,
"migration_days": 12,
"start_date": "2024-09-10",
"end_date": "2024-09-22"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-73.59,
45.47
],
[
-73.58,
45.47
],
[
-73.57,
45.47
]
]
},
"properties": {
"id": "fea-019",
"title": "Snowy Owl",
"quantities": 150,
"migration_days": 8,
"start_date": "2024-11-15",
"end_date": "2024-11-23"
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-73.6,
45.5
],
[
-73.6,
45.51
],
[
-73.6,
45.52
]
]
},
"properties": {
"id": "fea-020",
"title": "Peregrine Falcon",
"quantities": 300,
"migration_days": 5,
"start_date": "2024-10-01",
"end_date": "2024-10-06"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.59,
45.54
],
[
-73.58,
45.54
],
[
-73.58,
45.55
],
[
-73.59,
45.55
],
[
-73.59,
45.54
]
]
]
},
"properties": {
"id": "fea-021",
"title": "Montreal Urban Farm 1",
"size": "200 hectares",
"harvest_quantity": "400 tons",
"harvest_date": "2024-09-05"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.61,
45.46
],
[
-73.6,
45.46
],
[
-73.6,
45.47
],
[
-73.61,
45.47
],
[
-73.61,
45.46
]
]
]
},
"properties": {
"id": "fea-022",
"title": "Montreal Urban Farm 2",
"size": "150 hectares",
"harvest_quantity": "300 tons",
"harvest_date": "2024-10-10"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-73.54,
45.53
],
[
-73.53,
45.53
],
[
-73.53,
45.54
],
[
-73.54,
45.54
],
[
-73.54,
45.53
]
]
]
},
"properties": {
"id": "fea-023",
"title": "Montreal Urban Farm 3",
"size": "250 hectares",
"harvest_quantity": "500 tons",
"harvest_date": "2024-08-15"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms"
xmlns:odk="http://www.opendatakit.org/xforms">
<h:head>
<h:title>select-one-from-map-external-files</h:title>
<model odk:xforms-version="1.0.0">
<instance>
<data id="select-one-from-map-external-files">
<show_q1/>
<q1/>
<disable_q2/>
<q2/>
<q3/>
<meta>
<instanceID/>
</meta>
</data>
</instance>
<instance id="geodataGeoJson" src="jr://file/geodataGeoJson.geojson"/>
<instance id="geodataCsv" src="jr://file-csv/geodataCsv.csv"/>
<instance id="geodataXml">
<root>
<item>
<name>1</name>
<label>Madrid</label>
<geometry>40.446254412914385 -3.7445467750577563</geometry>
</item>
<item>
<name>2</name>
<label>Warsaw</label>
<geometry>52.18544754541023 21.1006145352125</geometry>
</item>
<item>
<name>3</name>
<label>Stockholm-Copenhagen-Berlin</label>
<geometry>59.31284185390564 18.04203801493341; 55.7237702447557 12.59922155107742; 52.48574101841746
13.337427033540052
</geometry>
</item>
<item>
<name>4</name>
<label>Prague-Vienna-Budapest</label>
<geometry>47.485570717616696 19.04921763281365; 48.19954394662233 16.42105774490628; 50.139932923435055
14.417694964430638
</geometry>
</item>
<item>
<name>5</name>
<label>London-Leeds-Liverpool-London</label>
<geometry>53.40903732686215 -2.991905620523312; 51.505094241512666 -0.1321803079139272; 53.8052722823615
-1.5363611594108022; 53.40903732686215 -2.991905620523312
</geometry>
</item>
<item>
<name>6</name>
<label>Paris-Basel-Frankfurt-Paris</label>
<geometry>48.840915452897946 2.3146557958955327; 47.54579786412256 7.63542665300713; 50.10149750150822
8.703168961933983; 48.840915452897946 2.3146557958955327
</geometry>
</item>
</root>
</instance>
<bind nodeset="/data/show_q1" type="string"/>
<bind nodeset="/data/q1" type="string" relevant="selected(/data/show_q1, 'yes')"/>
<bind nodeset="/data/disable_q2" type="string"/>
<bind nodeset="/data/q2" type="string" readonly="selected(/data/disable_q2, 'yes')"/>
<bind nodeset="/data/q3" type="string"/>
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/>
</model>
</h:head>

<h:body>
<select1 ref="/data/show_q1">
<label>Do you want to show the select with geojson file?</label>
<item>
<value>yes</value>
<label>Yes</label>
</item>
<item>
<value>no</value>
<label>No</label>
</item>
</select1>

<select1 ref="/data/q1" appearance="map">
<label>Select one from geojson file</label>
<itemset nodeset="instance('geodataGeoJson')/root/item">
<value ref="id"/>
<label ref="title"/>
</itemset>
</select1>


<select1 ref="/data/disable_q2">
<label>Do you want to disable the select with csv file?</label>
<item>
<value>yes</value>
<label>Yes</label>
</item>
<item>
<value>no</value>
<label>No</label>
</item>
</select1>

<select1 ref="/data/q2" appearance="map">
<label>Select one from csv file</label>
<itemset nodeset="instance('geodataCsv')/root/item">
<value ref="name"/>
<label ref="label"/>
</itemset>
</select1>

<select1 ref="/data/q3" appearance="map">
<label>Select one from xml file</label>
<itemset nodeset="instance('geodataXml')/root/item[true()]">
<value ref="name"/>
<label ref="label"/>
</itemset>
</select1>
</h:body>
</h:html>
Loading