Hi,
I'am not an expert but you could do something like this.

//in your init function
//define the style of your layer
var myStyles = new OpenLayers.StyleMap({
    "default": new OpenLayers.Style({
    fillColor: "#ffcc66",
    strokeColor: "#ff9933",
    strokeWidth: 2
    })
});

//Create a layer to pur your points in
var points = new OpenLayers.Layer.Vector(
    'Points', {styleMap: myStyles}
);
.........

Create a new function..
Assuming the input elements are called lon and lat
function createPoint()
{
    //create your point with your values
    newpoint = new OpenLayers.Feature.Vector(
        new OpenLayers.Geometry.Point(
            (document.forms.yourform.lon.value,
document.forms.yourform.lat.value)
        )
    );
    //add point to layer
    points.addFeatures(features);
}
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to