Find if a map cords are withing a cycle

This forum contains topics that were moved from Get Satisfaction
Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Find if a map cords are withing a cycle

Post by Bruce Stuart »

check this out ---- the error code implies you don't have an index on the field - so perhaps recreating the service may be the correct idea...

http://stackoverflow.com/questions/23...

also - it shows that there are some alternative ways to use the correct query....

let me know - if you don't get there with this query - I'll build the same table in a sample app and send it to you to compare...

Best,

Bruce

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Find if a map cords are withing a cycle

Post by Takis »

Well, I looked at some other threads and I see that in the DB table columns if there is an index in geopoint it appears as

(columnName),idx

This does not appear in my DB, even after recreating the index several times.
I even tried to another column, but again the ",idx" part did not appear.

Appery team, is this how it supposed to be, is this a bug ?

Image

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Find if a map cords are withing a cycle

Post by Takis »

Appery team can you please assist ?

Is the index created or not?
Should I see the ",idx" part in column where I created the index?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Find if a map cords are withing a cycle

Post by Evgene Karachevtsev »

Hello Panagiotis,

Sure, we are working on it at the moment and will get back to you with the update.

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Find if a map cords are withing a cycle

Post by Takis »

One more info
I went in the DB on the geopoint column and I just typed inside the
[23.793436,38.004065] as you see it here.

Is this OK or I should insert the values in some other way?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Find if a map cords are withing a cycle

Post by Evgene Karachevtsev »

Panagiotis,

Would you kindly let me know what kind of index and idx is it? We don't have such.
Here is a documents about geopoint http://devcenter.appery.io/documentat...

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Find if a map cords are withing a cycle

Post by Takis »

I just want to create an index on a geopoint column.
See the picture above.
I press OK and it is supposed to be created, I do not get any error.
I am asking, if after creating the index, I should see in the DB GUI under the name of the column something like this
==================
(geopoint),idx
==================

Currently I do not see it. It just displays geopoint.

Any feedback about the error I get ?

A summary of what I created

==DB Table
Image

==Index on geopoint looks to be created
Image

==Query Service
Image

==Query geopoint test with where ={"CustomerGeoPoint1": {"$nearSphere": [23.791376,38.002788], "$maxDistanceInMiles": 1}}

Image

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Find if a map cords are withing a cycle

Post by Takis »

I am sure that at the end, the solution will be very simple....
Hope I be true !!!

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

Find if a map cords are withing a cycle

Post by Maryna Brodina »

Hello!

You can manage indexes by clicking on manage indexes button http://devcenter.appery.io/documentat...

The problem is that you specify incorrect coordinates value [23.791376,38002788]

Latitude and longitude shouldn't be more than 180, but you specified 38002788 (with missing dot perhaps)

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Find if a map cords are withing a cycle

Post by Takis »

In my last update I say that I ue

{"CustomerGeoPoint1": {"$nearSphere": [23.791376,38.002788], "$maxDistanceInMiles": 1}}

Can someone make a simple test?
-One table with one geopoint column and put same test values.
-A database query service for this table
-Then go to the service Test tab and put in where clause the $neaSphere fuction
Is it working for you ?

Post Reply