MapStore crashes when highlighting or searching for GeometryCollection

31 views
Skip to first unread message

osterauer...@gmail.com

unread,
Apr 15, 2022, 7:30:52 AMApr 15
to mapstor...@googlegroups.com

Hi,

 

I’m using a layer via Geoserver with geom type „GeometryCollection“, that is a combination of points and lines. The layer shall be searchable via the search service and also the elements shall be selectable in the map.

Unfortunately MapStore crashes whenever I select a search result or try to highlight the element via the feature information window.

The only workaround seems to be, to set the geom type in Geoserver to „Point“ (also „Geometry“, „Line“, … do not work), but this has the effect, that the elements are replaced by their centerpoint and therefore cannot be correctly displayed or selected in the map.

 

The two functions have definately been working with GeoemtryCollection before, as I have been using the layer in this way for some time.

I cannot tell when the issue appeared or if maybe i accidentally changed something.

 

Thanks for any hint.

Michaela

Surendhar Dharmalingam

unread,
May 31, 2022, 3:52:48 AMMay 31
to mapstore-users
Hi  Michaela,

Apologies for the delayed response.

Are you still having trouble with these functionalities when using the `GeometryCollection` ?

If so, could you please export the map with the said layer via Mapstore's Export tool and share us the exported file to enable to us to better understand the cause to provide you with a solution. Thanks!

Regards,
Surendhar Dharmalingam
==
GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services-us for more information.
==
Surendhar Dharmalingam
Frontend Software Engineer
GeoSolutions Italy
phone: +39 0584 962313
fax:      +39 0584 1660272
http://www.geosolutionsgroup.com
http://twitter.com/geosolutions_it

osterauer...@gmail.com

unread,
Jun 20, 2022, 3:15:10 AM (6 days ago) Jun 20
to mapstor...@googlegroups.com

Hi Surendhar,

 

no problem, thanks for the answer!

Attached you find a respective file.

The displayed layer is a group layer, consisting of 4 layers: obstacle_point, obstacle_curve, obstacle_surface and obstacle_collection. The first three are only for displaying, while the last one is of type GeometryCollection and is used for the GFI request.

It is possible to successfully select the objects in the map (GFI opens), but as soon as i want to highlight the object, Mapstore crashes. I used to use the obstacle_collection layer also for the search service, but currently, whenever a search result is selected, MapStore crashes too. Therefore I created an own layer for searching, which is identical to the obstacle_collection layer, but is of type Point. Unfortunately, the search results of this layer are also not highlighted correctly, due to the point geometry. I implemented both services in the attached example. (e.g. search for „Ramolhaus“).

 

Best regards,

Michaela

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/84474c7e-068c-44af-bd38-58695f251056n%40googlegroups.com.

map_obstacle.json

Surendhar Dharmalingam

unread,
Jun 21, 2022, 8:44:06 AM (5 days ago) Jun 21
to mapstore-users
Hi  Michaela,

The problem is caused by the key `geometry` in the properties. When reading features, the Ol library set the properties which replaces the `geometry` field in the Feature from the general values collection pool. Hence when trying to getGeometry() from the feature it returns a string instead of the geometry object, causing app to crash.

Possible workaround is to remove the `geometry` key in the properties. Please give it a try and let us know if you need more assistance on the same. Thanks.

Meanwhile we will create a ticket on our end to handle this scenario by omitting the geometry field in properties, if any, which should avoid these crashes in the future.

2022-06-21 17_32_43-DevTools - localhost_8091__debug=true.jpg

Regards,
Surendhar Dharmalingam
==
GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services-us for more information.
==
Surendhar Dharmalingam
Frontend Software Engineer
GeoSolutions Italy
phone: +39 0584 962313
fax:      +39 0584 1660272
http://www.geosolutionsgroup.com
http://twitter.com/geosolutions_it

osterauer...@gmail.com

unread,
Jun 21, 2022, 9:47:18 AM (5 days ago) Jun 21
to mapstor...@googlegroups.com

Hi Surendhar,

 

thank you so much, that fixed my problem!

Although the highlight function for multipoints via the GFI window doesn’t work. Multilines and Multipolygons are displayed correctly via the function. Search results are always highlighted correctly. Also single points of other layers are correctly highlighted via the GFI Window.

 

Search result line and point      

GFI window highlight result

 

Search result multipoint

 

GFI window highlight result

 

Regards

Michaela

Von: mapstor...@googlegroups.com <mapstor...@googlegroups.com> Im Auftrag von Surendhar Dharmalingam
Gesendet: Dienstag, 21. Juni 2022 14:44
An: mapstore-users <mapstor...@googlegroups.com>
Betreff: Re: [mapstore-users] Re: MapStore crashes when highlighting or searching for GeometryCollection

 

Hi  Michaela,

 

The problem is caused by the key `geometry` in the properties. When reading features, the Ol library set the properties which replaces the `geometry` field in the Feature from the general values collection pool. Hence when trying to getGeometry() from the feature it returns a string instead of the geometry object, causing app to crash.



Possible workaround is to remove the `geometry` key in the properties. Please give it a try and let us know if you need more assistance on the same. Thanks.


Meanwhile we will create a ticket on our end to handle this scenario by omitting the geometry field in properties, if any, which should avoid these crashes in the future.

 

image001.png
image002.png
image003.jpg
image004.png
image005.png
Reply all
Reply to author
Forward
0 new messages