The Vector class, part two
Now that we've gotten a bit more of an understanding as to how the vector layer works, we can start doing some more interesting things. First though, let's do a quick recap of what we've covered so far:
The Vector class allows us to display vector objects on our map, using a variety of different renderers (SVG, Canvas, VML) to accomplish this.
Objects, such as points and polygons, in the vector layer are
OpenLayers.Feature.Vector
class objects.Each
Feature
object contains aGeometry
object which contains spatial information.We can use a variety of Vector, Geometry, and Feature class methods to move the feature objects on the map, add features, and get information about the feature and geometry objects on the map.
So to reiterate—so far, we've looked mainly at the Vector class itself and how to interact with features we add to it. What's left then?
Well, funny you should ask. You've probably noticed we have not spent a whole lot of time creating the actual vector layer...