Page 1 of 1

Addressing multiplle mapped values through Javascript

Posted: Wed Aug 12, 2015 8:12 am
by Juan Pieterse

Hi. I am trying to address these 2 variables (marked in RED) with the Javascript (Marked in Green)below.
If (as it currenltly is depicted) I drag both of them to the right, I can address them one at a time, but not together.
(I want to use those 2 values do a straight line distance calc, using another pair or co-ords I've got in local storage. I know how to do the math bit as well as addressing the 2 Local Storage variables, so that is not the issue.)
So can someone please provide me with the line or 2 of JavaScript and tell me how to address these 2 values.
Image

Also, initially I query a database, which returns a list of items within a certain radius.
FIRST PRIZE, will be to also have the database result spit out the distance in the query result.
Image


Addressing multiplle mapped values through Javascript

Posted: Thu Aug 13, 2015 5:48 pm
by Serhii Kulibaba

Hello Juan,

It is impossible to use two or more mappings for one distance parameter.
Please add JS code to the parent component (RListItem). E.g.:

$(element).find("[name=SLD_Label]").text(value.ItemLat + ":" + value.ItemLon);

here ItemLat, ItemLon - item's children elements
element - current RListItem component


Addressing multiplle mapped values through Javascript

Posted: Fri Aug 14, 2015 7:56 am
by Juan Pieterse

BRILLIANT!!! Thank you so much Sergiy!