Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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

Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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

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

How to eliminate parameter field? keep only value for request

Hello

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

Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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?

Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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

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

How to eliminate parameter field? keep only value for request

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

Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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

Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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

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

How to eliminate parameter field? keep only value for request

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

Wyatt Patry
Posts: 0
Joined: Fri Jun 12, 2015 6:38 am

How to eliminate parameter field? keep only value for request

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)?

Return to “Issues”