On the maps server, the /map_ol_mop/oliver_editing_snap_split_demo.php viewer
can demonstrate this.
This viewer is non-HTTPS, has 3 editing layers (a point, a line, and a poly)
and 3 layers for snapping.
toolSettings.editTool.layers = [
{
featureType: "AFREEMAN.GEOSERVER_TEST_PT",
layerTitle : "Geoserver Editable Point",
split: true,
snapTo: ["AFREEMAN.GEOSERVER_TEST_PT","GISDATA.SCHOOLS_PT"]
},
{
featureType: "AFREEMAN.GEOSERVER_TEST_LINE",
layerTitle : "Geoserver Editable Line",
split: true,
snapTo: ["AFREEMAN.GEOSERVER_TEST_LINE","GISDATA.TOWNS_POLY"]
},
{
featureType: "AFREEMAN.GEOSERVER_TEST_POLY",
layerTitle : "Geoserver Editable Polygon",
split: true,
snapTo: ["AFREEMAN.GEOSERVER_TEST_POLY","GISDATA.COUNTIES_POLY"]
}
];
When drawing a new point, line or polygon all the snapping works properly.
First, the user is requested to draw a box indicating the snapping area.
The point layer snaps to itself and schools, the line layer snaps to itself and
towns, and the poly layer snaps to itself and counties.
The layers only snap to features within (actually selected by) the snapping
area drawn by the user.
So far so good. Now for editing existing features.
I'm told that the snapping area for existing points is defined by the box that
the user draws to select the feature to edit.
Keeping that in mind, let's see what happens:
I refreshed the viewer in between each test, to clear out any lingering effects.
1. If I select one point by drawing a small box around it. It shouldn't snap to
anything and it doesn't. This is good.
2. If I select two points by drawing a box around them they should snap to the
each other (once I choose one to move). However, neither of them snap to each
other. They don't snap to anything else which is good.
3. If I select one point by drawing a box around it and a school, the point
should snap to the school. It doesn't snap to the school which is bad. It
doesn't snap to anything else which is good.
4. If I select one line by drawing a small box around it. It shouldn't snap to
anything, however, it snaps to towns. This is bad.
5. If I select two lines by drawing a box around them they should snap to the
each other (once I choose one to move). However, neither of them snap to each
other. They both snap to towns. Both bad.
6. If I select one line by drawing a box around it and a town, the line should
snap to the town. It does snap to the town, but not just the one town feature
- all towns - this is bad.
7. If I select one poly by drawing a small box around it. It shouldn't snap to
anything. However, it snaps to counties (any county) which is bad.
8. If I select two polys by drawing a box around them they should snap to the
each other (once I choose one to move). However, neither of them snap to each
other - bad. However, they both snap to counties (any county) which is bad.
9. If I select one poly by drawing a box around it and a county, the poly
should snap to the county. It does, however, it snaps to any county which is
bad.
Original issue reported on code.google.com by Aleda.Fr...@state.ma.us on 30 Nov 2011 at 6:02
Original issue reported on code.google.com by
Aleda.Fr...@state.ma.us
on 30 Nov 2011 at 6:02