[GIS] How to get rid of that blue circle that is on the cursor when drawing a point in OpenLayers

openlayers-2

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!

Best Answer

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});