How can we draw custom shapes as features on open layers map?
in our project, we have to dislpay multi colored custom shapes (just like pushpins) as Features on the map. the colors in the shapes change according to the undelaying data that the Feature depicts. say, a released order shows green color and a free order shows red when these two are in a cluster, the feature should be colored in half green and half red depicting that the cluster contains both types of orders.
how can this be done?
Regards Jatin
To achieve this you must
An example can be found in the showcase : http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=Rule%20Based%20Style
In this example a random attribute 'foo' is attached to the features. Based on the value of this attribute the markers get coloured (less then 25 = blue ; between 25 and 50 = gold ; between 50 and 75 green ; else red)
Click the "View Source" button in the showcase to check out the code.