Chris Ratcliffe
Posts: 0
Joined: Sun Apr 13, 2014 9:03 pm

Geolocation problem

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Geolocation problem

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.

Chris Ratcliffe
Posts: 0
Joined: Sun Apr 13, 2014 9:03 pm

Geolocation problem

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Geolocation problem

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/

Chris Ratcliffe
Posts: 0
Joined: Sun Apr 13, 2014 9:03 pm

Geolocation problem

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Geolocation problem

Hello!

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

Chris Ratcliffe
Posts: 0
Joined: Sun Apr 13, 2014 9:03 pm

Geolocation problem

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Geolocation problem

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.

Chris Ratcliffe
Posts: 0
Joined: Sun Apr 13, 2014 9:03 pm

Geolocation problem

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!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Geolocation problem

Hi Chris,

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

Return to “Issues”