* backspaceNode leaves junctions on other ways highlighted
* GPS loading should have a loading... label
* Pressing undo/redo sometimes doesn't change controllerstate. (e.g. create POI + undo leaves the tag panel still referring to POI)
-* Resizing window doesn't update Yahoo, until map is panned.
-* Small window -> yahoo -> mapnik -> big window -> yahoo leave yahoo layer borked.
* Can't use + for second tag
== Miscellaneous data model ==
// Resize map size based on current stage and height
public function updateSize(w:uint, h:uint):void {
+ mapwidth = w; centre_lon=coord2lon(-x+w/2);
+ mapheight= h; centre_lat=coord2lat(-y+h/2);
+
this.dispatchEvent(new MapEvent(MapEvent.RESIZE, {width:w, height:h}));
- mapwidth = w;
- mapheight= h;
if ( backdrop != null ) {
backdrop.width=mapwidth;
backdrop.height=mapheight;
public function show():void {
visible=enabled=true;
- if (inited) { moveto(map.centre_lat, map.centre_lon, map.scale); }
+ if (inited) {
+ moveto(map.centre_lat, map.centre_lon, map.scale);
+ this.setSize(map.mapwidth,map.mapheight);
+ }
map.addEventListener(MapEvent.MOVE, moveHandler);
map.addEventListener(MapEvent.RESIZE, resizeHandler);
this.zoomLevel=18-scale;
this.centerLatLon=new LatLon(lat+offset_lat, lon+offset_lon);
}
-
+
private function resizeHandler(event:MapEvent):void {
+ moveto(map.centre_lat, map.centre_lon, map.scale);
this.setSize(event.params.width, event.params.height);
}