I wanted to create a map like this
http://openlayers.org/dev/examples/mobile-jq.html#mappage using JqueryMobile
and OpenLayers but I wanted to add features using the click handler like in
this example http://openlayers.org/dev/examples/click.html but when I
activate my click handler to add features coded thusly
function createFeature(theName, theNote, theLocal){
var observationLayer =
map.getLayersByName("customFeatures")[0];//getLayersByName
var point = new OpenLayers.Geometry.Point(theLocal.x,theLocal.y);
var pointFeature = new OpenLayers.Feature.Vector(point);
pointFeature.attributes={
name: theName,
point:theLocal,
note:theNote
};
observationLayer.addFeatures([pointFeature]);
// note, the marker icon for this point is declared in the styleMap of the
customFeatures layer
}
What might I be doing wrong. How do I debug this?
Nehemiah I. Dacres
Consultant, Booz Allen Hamilton
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users