var plzn = new OpenLayers.Layer.Vector(
"<img src=\"images/paint.png\" width=\"12\" height=\"12\"/>PLZ-Nodes", {
protocol: new OpenLayers.Protocol.HTTP({
url: "db/cgi-bin/"+layer_script,
format: new OpenLayers.Format.OSM(),
params: {
fetch: "plzn"
}
}),
styleMap: myStyle2,
maxResolution: 15.0, // ist ab zoom 14 aktiv
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.BBOX({ratio: 1, resFactor: 1.1})
,new OpenLayers.Strategy.Cluster({distance: 32, threshold: 8})
]
});
ich hab die richtigen werte durch ausprobieren rausbekommen.
die kann/sollte man natürlich auch aus der resolution berechnen aber ich habs nicht hingekriegt.
15.0 → zoom 14,
30.0 → zoom 13
gruss
walter
das hat mir gereicht. dann ist das layer “aktiv” und er besorgt sich erst dann die daten.