Page 1 of 2

How to eliminate parameter field? keep only value for request

Posted: Sun Jun 14, 2015 5:24 am
by Wyatt Patry

How do I get rid of the "start_lng", "start_lat" and only keep the value (actual longitude and latitude?) see screens...
Image
Image


How to eliminate parameter field? keep only value for request

Posted: Mon Jun 15, 2015 6:39 am
by Wyatt Patry

If anyone is interested in a solution... this is messy, I'm sure there's a better way, always is in Java :-):
Image


How to eliminate parameter field? keep only value for request

Posted: Mon Jun 15, 2015 3:29 pm
by Serhii Kulibaba

Hello

I am sorry, not sure I understand you correctly. Please specify your question. Do you need save these parameters for next requests?


How to eliminate parameter field? keep only value for request

Posted: Mon Jun 15, 2015 8:03 pm
by Wyatt Patry

I was trying to get a service response, stored as array in local storage, to format as a linestring:

ie LINESTRING(-121.0 37.7, -120.63 36.87, -123.98 38.76)

So I just ran a loop to pull out all the unnecessary characters, but I'm sure there was a better way?


How to eliminate parameter field? keep only value for request

Posted: Mon Jun 15, 2015 8:03 pm
by Wyatt Patry

This was to pass into another service request, so it requires that format


How to eliminate parameter field? keep only value for request

Posted: Tue Jun 16, 2015 5:45 pm
by Serhii Kulibaba

Wyatt, please add handler on success event of this service.
There is full service response is available in "data" valiable, so you can manipulate its like simple JS array:

prefor (var i = 0; i < data&#46;length; i++){
var startStr = data&#46;start_lng + " " + data&#46;start_lat;
console&#46;log("start "+ startStr);
}/pre


How to eliminate parameter field? keep only value for request

Posted: Tue Jun 16, 2015 8:20 pm
by Wyatt Patry

ok, so data is automatically defined as the incoming/mapped variable?


How to eliminate parameter field? keep only value for request

Posted: Thu Jun 18, 2015 7:10 am
by Wyatt Patry

I just get 'data not defined' when I run that...


How to eliminate parameter field? keep only value for request

Posted: Thu Jun 18, 2015 7:52 pm
by Serhii Kulibaba

Do you use success event? Please send us screenshots with this error and action where you use JS.


How to eliminate parameter field? keep only value for request

Posted: Sun Jun 21, 2015 7:36 pm
by Wyatt Patry

Yes, see below. I have tried mapping that from both a storage variable and directly from the service and I get data not defined each time. This is on success event. Is it because I am testing in a non-framed Chrome window(security disabled)?