question

Tomi Kosunen avatar image
0 Likes"
Tomi Kosunen asked Phil BoBo answered

GIS Map point location update problem

Hi

It seems, that newly created GIS map point has location 0,0,0. It is updated when user selects the point. Is there a way to update the location from FlexScript? I tried updatelocations with no success. Also if the map is translated, the point locations should change but they don't.

What I'm trying to do is to locate a 3D object on the Map point location. I should know the point location, but now the point location is not updating correctly. Another solution could be to move the 3D object into the point with moveobject. But then the 3D object is not drawn at all.


mapptlocationupdate.gif


FlexSim 23.0.1
gis location update
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image
1 Like"
Phil BoBo answered

A GIS Point is drawn according to its Latitude and Longitude properties. It could be drawn any number of times in the 3D view in various locations. You can have 0, 1, or more maps, which each draw each point 0, 1, or 2 times.

For example, in the screenshot below, Point1 in the USA is drawn twice by Map1 and once by Map2. Depending on the maps' configurations, some Point objects may not be drawn at all.

1684764299407.png

The X, Y, and Z loc values of a Point are not used to draw it in the 3D view. You can set those properties to any value and it won't affect the drawing of the Point on the map. The 3D view's mouse click and drag code is setting those values on the Point Object instance; they aren't used by the GIS Point or Map classes, which are concerned with geographic space (lat/lon), not cartesian space (x/y/z).

If you want to render something on a map at a point's location, you should use the OnDraw trigger of the Point to render it. That way, it is rendered whenever and wherever the point is rendered, which could be 0, 1, or many times in the 3D view.


1684764299407.png (72.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered
Object gisPoint=Object.create("GIS::Point");
gisPoint.setProperty("Latitude",60.1699);
gisPoint.setProperty("Longitude",24.938);
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.