Hi Team,
I am facing a problem in Displaying data in OSM Map ,
I have show Patients Address data in Map, for that I have to make data of patients as list of Dictionaries. which I am not aware of How to make that list of Dictionaries using expression editor.
But manually i can add list of dictionaries (Dummy) and show them on MAP as below,
{
{name: "abc", lat: 17.9467, lon: 78.2879, address: "abc street.", marker: {icon: "bus", iconShape: "marker"}},{name: "xyz", lat: 17.23, lon: 78.879, address: "abc street.", marker: {icon: "bus", iconShape: "marker"}},{name: "QWERTY", lat: 17.6947, lon: 78.8279, address: "abc street.", marker: {icon: "bus", iconShape: "marker"}}}
Which Results me the following, I am able to make manually dictionaries , But i dont know how values which are present in recordtype are converted into list of dictionaries. so i can show them on OSM .
Regards,
J Vinay
Discussion posts and replies are publicly visible
This is confusing. You say that you do not know how to create a list of dictionaries, but do exactly that a few lines later.
Hi Stefan,
Thanks for Quick Reply.
yeah i knew how to add manually i mean directly assignly values . But i dont know how to make them dynamically like i mentioned the Patient address saved in the recordtype should add the Mark Dynamically When ever a new Patient added to DB. so iam not able to that list of dictionaries.
Simply cast it using cast() function.
cast( a!listType(type!Map), local!recordData )
I believe this is what you are lookin for if you have the data stored in a recordType
a!forEach( local!recordData, { name: fv!item[recordType!recordName.fieldName], lat: fv!item[recordType!recordName.fieldName], lon: fv!item[recordType!recordName.fieldName], address: fv!item[recordType!recordName.fieldName], marker: { icon: "bus", iconShape: "marker" } } )
Thank you Sanchit Gupta.