Why not ask your question on the new OpenStreetMap Community Forum?

I'm trying to set up a Rule using the Function Filter. But it does not work: the lines on that layer are just black. More importantly, the function that I provide to filter the features, is never called.

Can someone please point out what is the mistake that i'm making?

Here is the code.

Thank you for your time and kind concern.

var my_filter = new OpenLayers.Filter.Function(
    function(attributes) {
       var x=0; 
       return true; 

var ruleLow = new OpenLayers.Rule({
    filter:my_filter ,
  symbolizer: {pointRadius: 10, fillColor: "green",
               fillOpacity: 0.5, strokeColor: "green"}

var my_style=new OpenLayers.Style( null,ruleLow);

var my_style_map=new OpenLayers.StyleMap({

this.vectors= new OpenLayers.Layer.Vector(
    "Vector Layer",

asked 23 Jul '12, 22:18

jenia's gravatar image

accept rate: 0%

closed 24 Jul '12, 08:46

Frederik%20Ramm's gravatar image

Frederik Ramm ♦

The question has been closed for the following reason "This is not an OpenLayers support forum. See www.openlayers.org for mailing lists and other ways to get in touch." by Frederik Ramm 24 Jul '12, 08:46

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 23 Jul '12, 22:18

question was seen: 2,831 times

last updated: 24 Jul '12, 08:46

powered by OSQA