3
votes
1answer
38 views

OpenLayers rules and context, what is the difference?

OpenLayers.Style employs two properties, "rule" and "context" which accordingly contain an array of OpenLayers.Rule and a set of methods. I have noticed that "context" can somehow substitute "rule". ...
0
votes
0answers
34 views

Openlayers stylemap default style doesn't render until mouseover in IE 7/8

I'm using Drupal 7 Openlayers, and adding my own custom behavior. I have no trouble getting my code included, and it works well on other browsers. But in IE 7/8, the layer features render with a null ...
0
votes
1answer
73 views

get and change style property openlayers

i need to change the property of some style after its created, and i need to change it with knowing only the string of the property name. i am getting string like "fillColor" and value like "blue", ...
0
votes
0answers
33 views

maintain different style for each feature in same layer

on feature selection, I am trying to change feature style of selected feature.so that assign different style to each selected feature that exist in same layer. I have done this successfully but when I ...
6
votes
2answers
217 views

Is it necessary to master openlayers to use geoserver?

Is it necessary to learn openlayers to use geoserver? Can i completely ignore OpenLayers so long as i master using geoserver to publish data on my website because i understand openlayers is contained ...
0
votes
1answer
356 views

OpenLayers map add combo in panel

I just want to add combo box on OpenLayers map panal. I dont know how to add combo to openlayer panel so currenly i have set absolute location to combobox , like this http://jsfiddle.net/4zNH6/ ...
0
votes
1answer
436 views

Draw order (zIndex) of OpenLayers polygons and points in the same layer

My question is similar but slightly different from this one: http://stackoverflow.com/questions/5003349/openlayers-vector-features-z-indexing I have an OpenLayers Vector layer which contains polygons ...
1
vote
0answers
258 views

How to use SLD to filter a WMS layer but without setting any styles?

I'm trying to filter (using OpenLayers) a WMS layer, served by MapServer. I've got this working by building the appropriate OpenLayers.Filter rule(s) with an empty Polygon symbolizer (so no specific ...
1
vote
1answer
48 views

How to reset the length of the control of scaleLine in OpenLayers?

I want to change the style of the control of the ScaleLine,but I have no idea where to change it,anybody can give me some advice? map.addControl(new OpenLayers.Control.ScaleLine());
1
vote
0answers
94 views

OpenLayers - Features in cloned layer changes style with original feature

Please help! My situation is that, I clone() a "newLayer" from an "oldLayer" with its features. Both of them seems correct at first. But then when I tried to change the style of "featureA" in the ...
-1
votes
1answer
397 views

How to convert 2D Map to Flat map like in google? [duplicate]

My requirement is shown below by maps. Map 1--My Map Map 2--I required I am using GeoServer v2.2(for publishing the map) and OpenLayers v2.11(to display the map). According to my client ...
0
votes
1answer
248 views

access attribute values in openlayers rule

I have a webgis where i use openlayers and i'm trying to make a FOR loop to generate a series of rules for my POI layer. I have tried just like that: http://pastebin.com/CTuiWd4V My problem is that ...
2
votes
0answers
103 views

Applying rules to FrameCloud popups in OpenLayers

I have style rules for features that enable the map to display the features based on its rule. For example, the map displays a feature from specific scale. I do this in this way newRule = new ...
0
votes
1answer
365 views

Openlayers Zoom based icon size

I am displaying icon in feature. I want the size of icon to be dependent to zoom level of map i.e. the icon appears smaller in low zoom levels and bigger in high zoom levels. i used stylemap for that ...
3
votes
0answers
137 views

Cross-browser marker animation in OpenLayers

Currently I'm trying to implement animated markers in OpenLayers. I'm using PNGs for the markers, set by the externalGraphic style property on an OpenLayers.Layer.Vector. I need to be able to make ...
3
votes
1answer
815 views

How to highlight on mouseover without wiping out select control

I am trying to highlight features of a vector layer as the mouse moves over them. I can make this work. I'm also trying to make the features selectable and have a popup box when they're clicked. this ...
0
votes
1answer
218 views

How add vector style rule filter with different value in table

I have a simple wfs layer from geoserver, here is code: //wfs-t editable overlay var wfs_layer = new OpenLayers.Layer.Vector("Vector sample", { strategies: [new OpenLayers.Strategy.Fixed()], ...
0
votes
2answers
399 views

OpenLayers Rule is not working as expected

I'm trying to add a rule to paint some roads of my GeoJSON file with a different style using OpenLayers. The problem is that even after adding a property "featureType" to the feature in response to ...
3
votes
0answers
151 views

OpenLayers and external CSS

I am using geoExt and OpenLayers to plot some map. Everything worked well until I had to add some styling. To display it on the webpage, I need to use the CSS of my university and once I do that, I ...
1
vote
2answers
1k views

Apply styles to WMS layer

I am working with OpenLayers (and GeoServer) and I am showing a WMS layer with countries in a map. Each object (country) in the layer has an attribute called NAME (the name of the country). I created ...
0
votes
1answer
165 views

Different Styles Within Vector Layer

Is there any way to configure OpenLayers styling method? I have a vector layer and I would like to style the features depending on a value of a flag variables, so I can't use rules. Lets say I have ...
1
vote
0answers
54 views

Why do temporary features disappear when hovered over?

With DrawFeature I'm putting new features to my map. With the hover option of SelectFeature it is possible to get feature information when hovering over it. Now I have the problem of disappearing ...
5
votes
1answer
787 views

how to display polygons as points until certain zoom level?

can somebody tell me how to display polygons as points until you zoom to some level. I'm speaking about OpenLayers. So, for example, if the zoom level is less then 10 than it should display feature as ...
2
votes
1answer
626 views

Changin features' pointRadius based on the current zoom level

I need to have my features change their pointRadius based on the current Zoom level. My questions are: Would it be possible to use Rule Based Styling techniques to overcome the problem? If yes, it ...
2
votes
2answers
239 views

How to make corners of openlayers with OSM map rounded?

I'm trying to apply style with border-radius:XXpx to my openlayers map: map = new OpenLayers.Map(name) map.addLayer(new OpenLayers.Layer.OSM()) But rounded corners are hidden by tiles of the map: ...
2
votes
3answers
761 views

how to change color of feature to mark it as recently modified with openlayers

I am developing a crowd sourced app using openlayers. after user clicks an feature, a popup form is displayed. After clicking the save button, the data is used in processing which takes some time so ...
1
vote
1answer
1k views

OpenLayers - draw feature with style, lost after map redraw

The function that I am trying to work on is: click on a feature and change its color. I tried to approach this by first recreating the feature with custom style: layer.drawFeature(feature, myStyle); ...
3
votes
1answer
1k views

How to use a sld file with Openlayers using OSM data?

My app, made with openlayers, displays building data called from overpass api. var data_url = "http://overpass-api.de/api/interpreter?data=(way[building](bbox);node(w););out body;"; //main working ...
2
votes
1answer
3k views

how do I position a popup relative to a point in Openlayers?

I have a fixed size FramedCloud Popup that I want to position relative to the point calling it, always above the point and with its right side 50px to the right of the point. I am looking at the API ...
6
votes
3answers
1k views

Openlayers - Cloned features get style from original feature

I am having a problem with the styling of a WFS vector layer from GeoServer after cloning features from it and adding them to a new feature. First I create a new empty vector layer and add it to the ...
1
vote
0answers
294 views

OpenLayers: How to get backgroundGraphic to go under externalGraphic

I've got a layer with nodes features on which I may want to display two images, a main one and a background one. This page : http://openlayers.org/dev/examples/marker-shadow.html shows what I want: ...
3
votes
1answer
647 views

change style of newly drawn points

I've a vector layer with a bunch of draw controls on it. You can add polygons, points and you can modify polygon. Now I changed the style of the points so they have a nice pin-like image. But them I ...
3
votes
1answer
263 views

OpenLayers OSM tile boundary

I have a local tile source of OSM tiles. I'd like to show the tile zoom, x, y on the tile so that I can optimize and create small offline groups of tile for specific areas(polygons). I can get the ...
2
votes
2answers
177 views

How can a style be set on a specific polygon using OpenLayers?

Using a polygon id, I want to highlight a polygon, while the mouse is outside of the map area. I can identify the polygon using the following approach: x = 53; for(i=0; ...
3
votes
1answer
2k views

How can GeoJson polygons be colored programmatically using OpenLayers?

I'm experimenting with dynamically setting the color values of a geojson polygon. In my geojson file, there is an attribute for each polygon called pop_den. I am trying to update the fillcolor of the ...
1
vote
1answer
589 views

Openlayers - Vector Layer - Combining hide/show features using style property

I am trying to filter vector layer features according to their attributes. I have 4 check boxes: type_1, type_2, shape_1 and shape_2 Note that I am using Extjs for interface. at beginning I could ...
2
votes
1answer
802 views

How to design markers - raster or vector?

I have several layers that are point geometries. I am defining them custom markers symbols and such symbols have colors (red, yellow and green) to represent values. Since there are several of them in ...
1
vote
3answers
1k views

How to show vector features in OpenLayers after hiding it?

I did change some vector features style (through check-boxes) using style property : var features = layer.features; for( var i = 0; i < features.length; i++ ) { //features[i].style = { ...
5
votes
4answers
10k views

Customizing Popups in Openlayers

Is it possible to customize the shape of popups in OpenLayers? For example, I am creating a pop-up using the following approach: var popup = new OpenLayers.Popup.FramedCloud( "popup", ...
1
vote
1answer
1k views

OpenLayers ModifyFeature and styling

In OpenLayers, I have a Vector layer with a StyleMap and SelectFeature and ModifyFeature controls, like this: vector_layer = new OpenLayers.Layer.Vector('My Vector Layer', {extractAttributes: true, ...
3
votes
2answers
1k views

How to change the vertex style for editing?

When I use drag feature, then the circles on the polygon edge has the same style. For example, this OpenLayers site. I need to change it, I mean they need to be a different color. What is their ...
5
votes
2answers
6k views

custom Layer Switcher style in openlayers

I use this example to customized my layer switcher in openlayers.But I want to change the position,width and height of layer switcher.I know it relates to CSS.I change some numbers to get some ...
5
votes
1answer
6k views

Assign Icons to specific points dynamically in OpenLayers

I have a json file describing features on a map (routes, points etc) points include places of interest such as airport, harbor etc. Is there a way to assign icons to these points? example: have a ...
2
votes
2answers
803 views

Multiple Maps with Styles not working in OpenLayers

I have created 2 maps(within 2 in a same page) along with their respective style maps. Both maps are having vector layers along with "LineString" geometry... added into them. Both style maps are ...
0
votes
1answer
1k views

Alternate colors of GeoJSON linestring segments in OpenLayers?

I am rendering a vector linestring via GeoJSON on top of an OpenLayers map. I'd like to alternate the styling between two slightly different shades of blue, such that the colors alternate from one ...
2
votes
2answers
1k views

Highlight the WFS Layer on mouseover

I've set up a WFS layer in openlayer: var v1497_shp = new OpenLayers.Layer.Vector("v1497_shp", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], //projection: new ...