Category Archives: OpenLayers

OpenLayers – Custom Style for Individual Features

Other than the subject, what’s included here, as following: Add Google Map as base map How to create vector layer How to add features to vector layer How to use WKT and display it on Map How to create dynamic label, radius & fill in OpenLayers Style How to display label based on zoom level

OpenLayers – Custom Feature Style

Topic: OpenLayers – Custom Feature Style Descriptions: To enable custom style to a particular feature by using renderIntent & adding new styleMap. Get Feature; var o = target_layer.features[3]; Set Style Name; var styleName = o.id + ‘_style’; Set render intent; o.renderIntent = styleName; Set the custom style; var style = new OpenLayers.Style({externalGraphic:’icons/marker_1.png’}); Add new style to styleMap;… Read More »