API not retrieving multipolygon

Are you looking for help?

This is a support forum for reporting issues related to Backendless services. Please note that due to our support policy we cannot provide you help with debugging your code, consulting in regards to any language or third-party library usage. For this kind of questions we recommend using more appropriate forums like Stack Overflow.

In order to suggest you a quality solution, we shall usually ask you to provide the details mentioned below first. Including them into your topic right away helps us to start investigating your issue much faster.

In case you have a suggestion or an idea, the details below are not always required, though still any additional background is welcome.

Backendless Version (3.x / 5.x, Online / Managed / Pro )

v 6.5.4 Pro

Client SDK (REST / Android / Objective-C / Swift / JS )

JS

Application ID

9E7A148A-BDD2-F600-FF8F-C6A7A2887400

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

  1. We call the API via JS to retrieve (and display) the multipolygons in the database (tables “communes”, “departements”, “epci” and “region”).
  2. The client should retrieve the multipolygons and display them on a map.

Actual Behavior

Please provide a description of what actually happens, working from the same starting point.

Be descriptive: “it doesn’t work” does not describe what the behavior actually is – instead, say “the request returns a 400 error with message XXX”. Copy and paste your logs, and include any URLs.

  1. For the entities composed of multipolygons, which are grouped like (()),(()),(()) in the database, the client only receives the first polygon of the group [(())], and the rest are not sent. Therefore, the shape is not correctly displayed on the client side.

Reproducible Test Case

Please provide a simple code that could be run in a new clean app and reproduce the issue.

This is the URL we call and from which we can only retrieve the first polygon :
https://eu-api.backendless.com/9E7A148A-BDD2-F600-FF8F-C6A7A2887400/B524C86C-5464-44D5-9508-370B6DD1D993/data/epci?where=nom%20like%20’%sophia%’

Hi, @Carlos_Holguin

Welcome to the community and thanks for trying out Backendless!

For now Backendless database supports the following spatial data types: POINT, LINESTRING, POLYGON and GEOMETRY. The last one is a “parent” data type called which is the base type which can accommodate any of the data types listed above. You can read more about supported data types in the following link.

I have created a ticket (BKNDLSS-28058) to add MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, MULTIGEOMETRY to the supported data types, we will discuss with the team the possibility of implementing it in the near future.

For now, you need to convert MULTIPOLYGON data type into a set of regular polygons.

Regards, Marina