Opened 14 years ago

Closed 14 years ago

#344 closed defect (fixed)

Object drawn by Redline with consumer map didn't display until Zoom map.

Reported by: liuar Owned by: madair
Priority: P2 Milestone: Future
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: jenny.he@… Browser: All
External ID: 1281964 Operating System: All
state: Committed

Description

Steps:

  1. Open one flexible web layout with consumer maps.
  2. Redline -> Draw point.

Results:
Nothing shown.
Zoom in or out, the point drawn displayed.
Object drawn by Spatial Query has the same issue.

Expected results:
The point should display directly.

Attachments (1)

patch344.patch (963 bytes ) - added by liuar 14 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by liuar, 14 years ago

  1. In redline.js, added the evt.feature.layer.redraw() to redraw the redline layer after feature added.
  1. In OpenLayers.js, updated setLayerZIndex method to make sure redline layer can display at the top of map layers, even there are more than one overlay layers.

by liuar, 14 years ago

Attachment: patch344.patch added

comment:2 by liuar, 14 years ago

Updated the resoution per Paul's suggestion. Added a function named moveLayerToTop for moving the redline layer to the top and redrawing it after feature added in this layer.

    ....

    featureAdded: function(evt) {
        this.triggerEvent(Fusion.Event.REDLINE_FEATURE_ADDED, evt.feature);	
		this.moveLayerToTop(evt.feature.layer);
    },
    
    // move the redline layer to the top and redraw it
    moveLayerToTop: function(layer) {
	var map = layer.map;
	var baseIndex = map.getLayerIndex(layer);
		
	if(baseIndex != layer.map.layers.length-2)
	{
	    // except for the current temp drawing layer, the redline layer is not on the top of the map.
	    map.setLayerIndex(layer,layer.map.layers.length-2)
	}
	layer.redraw();
    },

    ...

comment:3 by liuar, 14 years ago

Resolution: fixed
state: NewCommitted
Status: newclosed
Note: See TracTickets for help on using tickets.