Juan Pieterse
Posts: 0
Joined: Sat Apr 25, 2015 1:47 pm

Addressing multiplle mapped values through Javascript

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Addressing multiplle mapped values through Javascript

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

Juan Pieterse
Posts: 0
Joined: Sat Apr 25, 2015 1:47 pm

Addressing multiplle mapped values through Javascript

BRILLIANT!!! Thank you so much Sergiy!

Return to “Issues”