I’m having a problem setting the default map view on a geopoint question.
In the survey tab of my XLSForm I have used a default column to set the default by including 4 space-separated values: latitude, longitude, altitude, accuracy.
This works fine as long as both latitude and longitude are positive values, e.g. 12.18714 96.830564 0.0 0.0
However, I need the map default to be in the Southern Hemisphere, at -12.18714 96.830564 0.0 0.0
Whenever I use a negative value for lat or long, the geopoint question does not load, and if I try to Deploy the form I get the following error:
your form cannot be deployed because it contains errors:
Unexpected KoBoCAT error 400: b’{“detail”:“ODK Validate Errors:\n>> XForm is invalid. See above for the errors.\n: Invalid XPath in value set action declaration: '- 12.18714 96.830564 0.0 0.0'\n Problem found at nodeset: /html/body/group[@ref=${grp_location}]/group[@ref=${location_data}]/repeat[@count= ${location_data_count} ][@nodeset=${location_data}]/setvalue\n With element \n\n\nThe following files failed validation:\n${tmpuw21seg4}\n\nResult: Invalid”}’
Is this a bug, or am I using incorrect syntax or something?
Thanks Kal - this was the post that got me to where I am now.
As noted above, this works fine as long as both latitude and longitude are positive values, e.g. the hypotheticals you gave. If I use a negative latitude I get the error.
I followed the discussions from that post and searched the forums and only found examples using positive lat/long values, which is why I posted the issue here.
Hi again @wroos, I’ve attached an extract with the same question twice, only difference being the negative latitude… screenshot shows the survey preview.
Hello @BecSCS,
It seems a problem/bug of KoBoToolbox. (@Kal_lam, @Josh). The geopoint field even is shown as a simple text variable (see widget). Maybe the default is not parsed correctly, if it includes any “-” sign (either for latitude or for longitude!). The form will open in preview, but deployment will stop with an error.
As far as I can see, it works with the Online validator (Enketo). See screenshot at the end here.
.
As workaround in KoBoToolbox you could use a calculation - with once(…) - instead of the default, see example geopoint_default_03.xlsx (10.4 KB)
This will work, see lower part of the following screenshot.:
Further hint: You can import the XLSForm and it shows7stores the default in the KoBo FormBuilder, but the problem is the same on preview and deployment.
Offline with Collect (preferable ODK)? Probably even the default works with Collect. Would you mind to test it and give feedback here, please?
In Collect app you can configure the map style in the settings, e.g. google satellite or hybrid. In Enketo, there is also an appearance option satellite for geopoint etc., see XLSForm Reference Table. So, you can it it to the appearance as: satellite placement-map. It will show up in KoBo/Enketo, but not in the Online validator.
Furthermore, you can also change to satellite mode etc. with the Earth icon on the map.
Maybe someone form the community or Core Team can explain more help for the satellite option…
We’re still in the process of designing surveys, haven’t yet bought tablets or decided which app / collection method we’re going to use. Good to know that this should work with the Collect app. Will need to be offline as there is no phone signal at field survey locations.