-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

OpenLayers 2.10 Beginner's Guide

So far, we've accessed data from Flickr, saved it to a file, and added it to our map. This is pretty cool, but we really haven't done much else than just load in the data, from an OpenLayers point of view. It's useful, but we really haven't created a full featured 'web application' just yet. So, let's focus on how to build a more useful web-mapping application.
To do this, we'll basically need to do two general things:
Add some interactivity to our map.
Use 'live' data. We shouldn't have to manually download a KML file every time we want new data—our web application should do it automatically.
Let's focus on the first part, and then change the data source after we develop some interactivity.
In the previous example, each feature received an
externalGraphic
property because we used extractStyles
(causing thumbnails to be displayed for each feature)—but it's hard to see where they are on the map, especially when zoomed out. We'll need...
Change the font size
Change margin width
Change background colour