Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java code in JOSM Preset #453

Closed
mihainiculita opened this issue Jul 15, 2016 · 8 comments
Closed

Java code in JOSM Preset #453

mihainiculita opened this issue Jul 15, 2016 · 8 comments

Comments

@mihainiculita
Copy link

Hello,

I try to use a JOSM Preset and the values_from="JAVA code" feature (found it here https://josm.openstreetmap.de/wiki/TaggingPresets):

<key key="TIME" values_from="String mydate = java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());textView.setText(mydate);" />

I try to insert the current time, but this is not working.

Is this JOSM Preset feature supported by Vespucci.

I have identified also other tags that appear not to be supported. Can someone confirm what kind of support is available for JOSM Presets for the latest version of Vespucci?

Thanks in advance!
Mihai

@simonpoole
Copy link
Collaborator

You just need to RTFM: http://vespucci.io/tutorials/presets/

There are all kind of issues trying to support it in the form JOSM does would raise, I suspect a light weight script language like LUA or similar might be a more viable solution.

@mihainiculita
Copy link
Author

mihainiculita commented Jul 15, 2016

Thank you! I didn't knew that page. Now is clear for me.

@simonpoole
Copy link
Collaborator

Note that there aren't potentially other ways to implement what you want to do, could you detail that a bit?

@simonpoole simonpoole reopened this Jul 15, 2016
@mihainiculita
Copy link
Author

I develop my own schema osm tags and I would need to insert the time a feature is created.

@simonpoole
Copy link
Collaborator

And the time set when uploading by the API is not good enough?

@MarcusWolschon
Copy link
Owner

values_from="JAVA code" can't be done on the Phone as there is no Java runtime that can interpret code. It is compiled to Dalvik Byte-Code before it is uploaded to the Play Store.

@simonpoole
Copy link
Collaborator

See cf3e4bf for an initial test at supporting scripting.

@simonpoole
Copy link
Collaborator

Addressed in #536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants