O'Reilly logo

OpenLayers Cookbook by Antonio Santiago Perez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying features

When working on the web mapping application, most probably, the capability to allow the users to add new features would be a desired requirement, but what about modifying features such as move vertex, rotate features, scale, and so on?

Again, OpenLayers simplifies our lives as developers, giving us the powerful OpenLayers.Control.ModifyFeature control:

Modifying features

This time we are going to create a little application that will provide us with two important controls: first, to add new features and second, to modify them. For this purpose, we will use the OpenLayers.Control.EditingToolbar and OpenLayers.Control.ModifyFeature controls.

In concrete, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required