Skip to content

Commit 2b50a30

Browse files
committed
Allow coloured Polygons even if we have a graphic specified
1 parent d889a70 commit 2b50a30

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

examples/graphicfill.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer", { renderers: renderer });
3636

3737
map.addLayers([wmsLayer, polygonLayer]);
38-
map.addControl(new OpenLayers.Control.LayerSwitcher());
38+
//map.addControl(new OpenLayers.Control.LayerSwitcher());
3939
map.addControl(new OpenLayers.Control.MousePosition());
4040

4141
drawControls = {

lib/OpenLayers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@
416416
// use "parser-inserted scripts" for guaranteed execution order
417417
// http://hsivonen.iki.fi/script-execution/
418418
var scriptTags = new Array(jsFiles.length);
419-
if (undefined != 'S3.Ap') {
419+
try {
420420
// Sahana loader, required when running in pr_contacts()
421421
var host = S3.Ap.concat('/static/scripts/gis/openlayers/lib/');
422-
} else {
422+
} catch(e) {
423423
// Revert to normal OpenLayers loader
424424
var host = OpenLayers._getScriptLocation() + "lib/";
425425
}

lib/OpenLayers/Renderer/SVG.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
352352
var pid = this.createImagePattern(style);
353353
node.setAttributeNS(null, "fill", "url(#" + pid + ")");
354354
node.setAttributeNS(null, "fill-opacity", 1);
355-
} else if (style.graphicName && node._geometryClass !== "OpenLayers.Geometry.Point") {
355+
//} else if (style.graphicName && node._geometryClass !== "OpenLayers.Geometry.Point") {
356356
//this can also happen if a rule based style applies to both points and other types of geometries. TODO: better handling of rule based styles!
357-
OpenLayers.Console.error('WellKnownName is not yet supported as GraphicFill by the SVG renderer!');
357+
// OpenLayers.Console.error('WellKnownName is not yet supported as GraphicFill by the SVG renderer!');
358358
//var pid = this.createMarkPattern(style);
359359
//node.setAttributeNS(null, "fill", "url(#" + pid + ")");
360360
//node.setAttributeNS(null, "fill-opacity", 1);

lib/OpenLayers/Renderer/VML.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
305305
fill.aspect = "atmost";
306306
}
307307
}
308-
} else if (style.graphicName && node._geometryClass !== "OpenLayers.Geometry.Point") {
308+
//} else if (style.graphicName && node._geometryClass !== "OpenLayers.Geometry.Point") {
309309
//this can also happen if a rule based style applies to both points and other types of geometries. TODO: better handling of rule based styles!
310-
OpenLayers.Console.error('WellKnownName is not yet supported as GraphicFill by the VML renderer!');
310+
// OpenLayers.Console.error('WellKnownName is not yet supported as GraphicFill by the VML renderer!');
311311
}
312312
if (fill.parentNode != node) {
313313
node.appendChild(fill);

0 commit comments

Comments
 (0)