[OpenLayers-Users] adding points on the given coordinates

wrap map wrapmap at gmail.com
Fri Apr 17 04:08:52 EDT 2009


Senario, i have a lon-lat value and i want to draw a point on that value, i
had tried the following code to draw point;

function createPoint() {
    //create your point with your values
    newpoint = new OpenLayers.DFeature.Vector(
               new OpenLayers.Geometry.Point(
                (document.getElementById('longval').value,
document.getElementById('latval').value)
        )
    );
    //add point to layer
    vector.addFeatures(features);
}



the error is "features", what is the error and how can i solve this problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090417/a2f3eb50/attachment.html


More information about the Users mailing list