Hello!
Could you clarify what an issue do you face? The white screen instead of map component? If yes, you can try to delete:
-
src/main/bundle folder
-
frontend/generated folder
-
build folder (just in case)
Also clear cookies for localhost.
I’ve checked your project and I think there is a little issue. The projection you specify using map.setProjection()
is EPSG:21781
. It means that Map or its elements take the coordinates in specified projection. I saw mapView
extent uses WGS84 coordinates and VectorLayer
is bound with WGS84 property. So the Map thinks that property uses meter units and shows the point accordingly. And the same for the mapView
extent.
For MapView extent you can use the following converted coordinates (EPSG:21781):
<maps:extent minX="-1619770.8081953595"
maxX="2418526.323681824"
minY="-1380199.875185836"
maxY="2057726.0042004283"/>
To show the point with WGS84 you need to convert coordinates to EPSG:21781 and store it in transient property.
I’ve prepared a demo project that demonstrates coordinates conversion. The project contains two entities:
- PointBng: with transient
pointWgs
(WGS84) and point
(EPSG:27700)
- PointSwiss: with transient
pointWgs
(WGS84) and point
(EPSG: 21781)
And there is a view with two Maps with default WGS84 projection. These maps are bound with pointWgs
properties. Every entity converts coordinates from their projection to WGS84.
Project: sample.zip (117.4 KB)