Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In openlayers, before placing a point, there is a small blue circle the moves with the cursor. I want to get rid of that and can't figure out how. If possible, it must be in the following section of the code:

var drawFeature = new OpenLayers.Control.DrawFeature(vectorLayer, OpenLayers.Handler.Point); map.addControl(drawFeature);

I just can't seem to find anything on it! Thanks so much in advance!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You should to set up temporary style of your layer:

var defStyle = new OpenLayers.Style({strokeColor: "#FF0000", strokeWidth: 2, fillColor: "#FF0000", pointRadius: 5});
var tmpStyle = new OpenLayers.Style({display: "none"});
var myStyleMap = new OpenLayers.StyleMap({"default": defStyle, "temporary": tmpStyle});

vectorLayer = new OpenLayers.Layer.Vector("Layer", {styleMap: myStyleMap});
share|improve this answer
    
of course. Thanks a lot! –  Kyle May 3 '12 at 13:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.