diff --git a/examples/georss-flickr.html b/examples/georss-flickr.html
index 7e8d3037e9..747f7b5445 100644
--- a/examples/georss-flickr.html
+++ b/examples/georss-flickr.html
@@ -31,28 +31,34 @@
// the thumbail attribute of the rss item
style = new OpenLayers.Style({externalGraphic: "${thumbnail}"});
- // make the thumbnails larger when we select them
- selectStyle = new OpenLayers.Style({pointRadius: 35});
-
// create a rule with a point symbolizer that will make the thumbnail
// larger if the title of the rss item conatins "powder"
- var rule = new OpenLayers.Rule.Comparison({
- type: OpenLayers.Rule.Comparison.LIKE,
+ var rule = new OpenLayers.Rule({
+ symbolizer: {pointRadius: 30},
+ filter: new OpenLayers.Filter.Comparison({
+ type: OpenLayers.Filter.Comparison.LIKE,
property: "title",
- value: "*powder*",
- symbolizer: {"Point": {pointRadius: 30}}});
- rule.value2regex("*");
+ value: "*powder*"
+ })
+ });
+ rule.filter.value2regex("*");
// If the above rule does not apply, use a smaller pointRadius.
var elseRule = new OpenLayers.Rule({
- elseFilter: true,
- symbolizer: {"Point": {pointRadius: 20}}});
+ elseFilter: true,
+ symbolizer: {pointRadius: 20}
+ });
style.addRules([rule, elseRule]);
- markerLayer = new OpenLayers.Layer.Vector("", {styleMap: new OpenLayers.StyleMap({
- "default": style,
- "select": selectStyle})});
+ // Create a layer with a style map. Giving the style map keys
+ // for "default" and "select" rendering intent.
+ markerLayer = new OpenLayers.Layer.Vector("", {
+ styleMap: new OpenLayers.StyleMap({
+ "default": style,
+ "select": new OpenLayers.Style({pointRadius: 35})
+ })
+ });
map.addLayer(markerLayer);
// control that will show a popup when clicking on a thumbnail
diff --git a/examples/spherical-mercator.html b/examples/spherical-mercator.html
index 309456b3fa..efd304a7f4 100644
--- a/examples/spherical-mercator.html
+++ b/examples/spherical-mercator.html
@@ -121,7 +121,7 @@
map.addControl(new OpenLayers.Control.EditingToolbar(vector));
map.addControl(new OpenLayers.Control.Permalink());
map.addControl(new OpenLayers.Control.MousePosition());
- map.zoomToMaxExtent()
+ if (!map.getCenter()) {map.zoomToMaxExtent()}
}
function osm_getTileURL(bounds) {
diff --git a/examples/styles-context.html b/examples/styles-context.html
index 4849cfc540..9b9d9c65e7 100644
--- a/examples/styles-context.html
+++ b/examples/styles-context.html
@@ -105,112 +105,4 @@
on the context object passed to the Style constructor.