I have over than 100K geoObjects and i need to add them on map. How can i do it? Is there some limits on geoObjects on map or on vectorLayer?
Check this out Getting Started with Maps :: Jmix Documentation
So, your first step would be to create an entity to hold your geoObjects ,
(line, polygon or point - multiline, multipolygon, multipoint and collections are not supported yet)
and then create appropriate screens.
As you add more records to the table, map will display them, as the layer has that entity class set as datasource, so it will load all.
Single vector layer can have only one type of geometry.
If your data contains more than one geometry type, then you will need a vector layer for each type.
Next question is how to import your existing data, and it’s format. In my case I had to import data from google maps, containing polygons and points.
Used desktop version of Google Earth to load the kml file, and edited it to my liking, and exported single polygons again in separate kml files, as well as points.
Then I converted them to WKT format using this online tool, as the data is not sensitive or large quantity KML to WKT Converter Online - MyGeodata Cloud
Because mapps add-on stores by default in wkt format.
Once I got the polygons into wkt format, I copy-pasted them into my postgres database using pgAdmin - its no problem because geo types are stored physically as varchar.
In your case, you will likely need a serious converter utility, or write your own - its simple string manipulation to construct wkt from kml.
Also you will need to figure out how to import your data into the database - you will need to write an import utility. You can use jmix, because when you add new entity, framework will generate UUID for you, etc, you just need to set a value for your geo field and maybe some additional data like description, name etc …
As to how many objects you can add to a layer, I don’t know. My polygons were too large for default size of varchar 4000 so I enlarged the field to 40000, Haulmont confirmed that is not a problem.
Your problem may be loading speed, and ram memory, rather then some limitation. That is solved by more and faster CPUs and more ram …
You may want to import 10k, and observe loading speed and resource utilization, then load another 10k and so on…
I suspect if you hit an obstacle, you may then divide your data into several tables, and dynamically change the datasource of the layer, or filter the data to display less at a time.
Hope this helps.
Thank you so much!!! I will try) And yes using filter is helpful any time but i have ‘special’ order)