f0d44ae8fe
Fix the main bugs, add features and convert most of the layers. Move/refactor some things as well. Add a canvas map dialog next to the built-in one -- it's not 100% functional but it's quite close actually. As before, the excitement has been taking place at our team clone. https://gitorious.org/fg/canvas-hackers-fgdata/commits/0b4cc84 (topics/canvas-map-dialog branch this time, current HEAD in above URL.)
23 lines
610 B
Text
23 lines
610 B
Text
# WARNING: *.draw files will be deprecated, see: http://wiki.flightgear.org/MapStructure
|
|
##
|
|
# draw a single storm symbol
|
|
#
|
|
|
|
var draw_storm = func (group, storm, controller=nil, lod=0) {
|
|
var lat = storm.lat;
|
|
var lon = storm.lon;
|
|
var radiusNm = storm.radiusNm;
|
|
|
|
var storm_grp = group.createChild("group","storm"); # one group for each storm
|
|
|
|
storm_grp.createChild("image")
|
|
.setFile("Nasal/canvas/map/Images/storm.png")
|
|
.setSize(128*radiusNm,128*radiusNm)
|
|
.setTranslation(-64*radiusNm,-64*radiusNm)
|
|
.setCenter(0,0);
|
|
|
|
# the storm position
|
|
storm_grp.setGeoPosition(lat, lon)
|
|
.set("z-index",0);
|
|
|
|
}
|