Hi,guys.I am in trouble.
When I add the vector layer to my map the popup of my marker don't appear 
correctly.I find the response area become smaller,yes,actually,it is very small 
so that in order to show a popup I have to click repeatedly.
It works well if not add a Vector.
Thanks in advance.

.........
vectors = new OpenLayers.Layer.Vector("Simple Geometry", {
   style : layer_style
  });
map.addLayer(vectors);
var pointList = [];
for ( var i = 0; i < 50; i++) {
   newPoint = new OpenLayers.Geometry.Point(60 + i, 8 - i);
   pointList.push(newPoint);
  }
lineFeature = new OpenLayers.Feature.Vector(
    new OpenLayers.Geometry.LineString(pointList), null,
    style_green);
vectors.addFeatures([ lineFeature ]);

.....

           
var markerClick = function (evt) {
                if (this.popup == null) {
                    this.popup = this.createPopup(this.closeBox);
                    map.addPopup(this.popup);
                    this.popup.show();
                } else {
                    this.popup.toggle();
                }
                currentPopup = this.popup;
                OpenLayers.Event.stop(evt);
             alert('ok');
            };
            marker.events.register("mousedown", feature, markerClick);
            markers.addMarker(marker);
        }
.....
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to