0 votes
1 view
Hi,
is there a way to center and zoom map widget on all objects extend?

I noticed map widget shows at position when cockpit was saved.
I use parametrical datasets and cockpits so objects will be in a different area/country depending on parameters.
Centering map widget on objects when starting cockpit could be a very nice option for this widget.
An option to center map on objects when filtering data would also be neat.

Has this already been requested? Is it somewhere in Knowage roadmap?

Regards
asked Jun 1, 2021 in Cockpit, Dashboard and Console by rlagarde (3,170 points) | 1 view
Some relevant information I want to add here:

Centering map is working when using wkt as spatial attribute but not with geoJSON and string coordinates.
Problem is wkt isn't working with clusters and markers visualization types.
(already reported here : https://www.knowage-suite.com/qa/4948/visualisation-types-in-mapwidget)

Should I open a github issue about these ?
Hi all,

I can confirm there is a problems about centering the map on features. The library we use to draw the map doesn't have a precise way to center the map on features then we wrote a custom code to do that. We probably need to check something on that.

Yes, I think we need to investigate this problem and I appreciate @rlagarde's proposal to open a GitHub issue.

1 Answer

0 votes
Best answer
Hi all,

fixed in the next version, the 8.0.
answered Jul 7, 2021 by mlibanor (5,090 points)
selected Jul 7, 2021 by rlagarde
Great news! thanks

I just checked your fix and it's really nice. Thanks

Is there a way to get the centering done at cockpit launch ?
From what I saw, it only centers the view when selection change but not when first creating map.

Also I edited the fit call to add animation and padding so it looks nicer on ponctuals:

currView.fit(source.getExtent(),{padding: [10,10,10,10],duration: 1000});
1,555 questions
1,017 answers
2,038 comments
2,568 users