Page 1 of 5

Geolocation problem

Posted: Sun Apr 13, 2014 9:03 pm
by Chris Ratcliffe

Hi there, I'm trying to build an app with a geolocation service, following the tutorial http://docs.appery.io/tutorials/build....

All is going well until I get to the 'creating services' bit, specifically the 'server code service'. If I click on the 'request' tab, rather than showing 'radius, longitude and latitude' I see 'data' and 'content type'. The 'data' line is greyed out and I can't edit it, and has a value type of 'data'; and the 'Content-type' has a default value of 'text/plain' and a value type of 'string'. Can you give me a hint as to what I'm doing wrong please?! Thanks, Chris


Geolocation problem

Posted: Mon Apr 14, 2014 4:26 am
by Illya Stepanov

Hi Chris,

You should add this parameters as on this screenshot: http://docs.appery.io/wp-content/uplo...

Please follow these steps to do it:
ol
liOpen your service./li

liNavigate to Request tab./li

liEnter "radius" in the input and click "Add". http://prntscr.com/39tijx/direct/li

liEnter "longitude" and "latitude" parameters with the same way. And you will get this: http://prntscr.com/39tiuy/direct/li

liNavigate to "test" tab and you will see your input parameters: http://prntscr.com/39tj1u/direct/li
/ol
That's all.

Regards.


Geolocation problem

Posted: Mon Apr 14, 2014 7:42 am
by Chris Ratcliffe

Thank you for the very comprehensive answer. It still isn't working though. I have a feeling I've got a more fundamental problem! Am I able to send you a login for it?!


Geolocation problem

Posted: Mon Apr 14, 2014 7:50 am
by Kateryna Grynko

Hi Chris,

Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
docs.appery.io/documentation/sharing-and-collaboration/


Geolocation problem

Posted: Mon Apr 14, 2014 5:30 pm
by Chris Ratcliffe

Thank you very much. I've just invited you. I'm pretty much with the UI (there are a couple of things that could be tidier but I'm happy) but it doesn't seem to function (I'd rather it work, than look good!)


Geolocation problem

Posted: Mon Apr 14, 2014 6:09 pm
by Maryna Brodina

Hello!

In service settings you need to change method from GET to POST, enable Proxy.
Here is screenshot with service settings
Image


Geolocation problem

Posted: Mon Apr 14, 2014 6:23 pm
by Chris Ratcliffe

Hi Maryna,
I've made those amends, and it still isn't working. I had already got 'post' selected (unless you've made the amend) and I've set up the proxy. When I test it based on some test coordinates it comes back with the answer:
"Test failed! Please check service properties and the error details in "Response" area"

Any ideas?


Geolocation problem

Posted: Mon Apr 14, 2014 8:37 pm
by Maryna Brodina

Looks like you haven't change method to POST. For Proxy you have to specify channel http://docs.appery.io/documentation/s...
Please also follow tutorial carefully. You have incorrect parameter names (they are case sensitive). Same for DB collection and field names.


Geolocation problem

Posted: Tue Apr 15, 2014 12:39 pm
by Chris Ratcliffe

Hi there,
I think I've done everything you've suggested (for both pages of the app) and I'm still stuggling. Neither page is working.
On the geolocation bit, I've double checked case-sensitivity and the post/get bit, and it should be right now. I'm still getting an error message:
"
"status":"400 Bad Request",
"url":"https://api.appery.io/rest/1/code/fee...",
"response":{
"code":"BCXX002",
"description":"Cannot consume content type"
}
}"

On the startscreen, I think I've followed the tutorial correctly, but it is sending blank information into the database. Starting to lose the will!


Geolocation problem

Posted: Tue Apr 15, 2014 4:39 pm
by Kateryna Grynko

Hi Chris,

Don't give up! We are working on it.