[OpenLayers-Users] drawfeature question
sqgs
mxxerr at yahoo.com
Wed Feb 15 17:46:25 EST 2012
I am new to openlayers and am trying to make one similar to the the
Snap-Split example:
(http://openlayers.org/dev/examples/wfs-snap-split.html). I have two
questions:
1. I have drawFeature and modifyFeature, and I need a function like
isActivated() to see which control is currently active. I checked OpenLayers
document, and didn't see one. Is this function available? or any available
function to check which control is active?
2. When user clicks the Draw_Point icon, then clicks on map, I want to put
two points on the map, one at the click location, the other is 5degree north
of the click location. I want both points be movable (by clicking modify
icon to move points). Can someone give me a clue how to do it? Because
Clicking the Draw_Point icon will create a Point feature, I tried to
duplicate the Point feature, then change the centerlatlon, but not sure how
to do it.
Thanks.
here is my drawfeature and modifyfeature object:
var draw = new OpenLayers.Control.DrawFeature(
vector, OpenLayers.Handler.Point,
{
title: "Draw Feature",
displayClass: "olControlDrawFeaturePoint",
handlerOptions: {multi: false}
}
);
modify = new OpenLayers.Control.ModifyFeature(
vector, {displayClass: "olControlModifyFeature"}
);
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/drawfeature-question-tp4474203p4474203.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list