OpenLayers is a JavaScript library for creating dynamic map widgets for web sites.

learn more… | top users | synonyms

3
votes
1answer
199 views

msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed

I have the following code that generates a map with a couple of layers. var PIDS = ...
1
vote
1answer
153 views

BBOX strategy to load all features?

Since I have no way, other than using BBOX strategy with my vector layer + wfs protocol Is it required to use BBOX strategy with WFS protocol in OpenLayers? I'm wondering if there is a way to force ...
2
votes
1answer
1k views

Openlayers with allOverlays = true. How to create a dummy (base) layer?

I have an OpenLayers map with allOverlays set to true. Im adding 3 layers to the map. First, my own rendered version of OSM data (but only for levels 8-16), secondly an orthophoto layer (for levels ...
3
votes
2answers
2k views

How to make the Overlays section in an OpenLayers LayerSwitcher exclusive?

At the simplest level I need to figure out how to create a customized OpenLayers LayerSwitcher Overlays section which is not using Checkboxes, but uses RadioButtons instead. For my application its ...
2
votes
1answer
180 views

OpenLayers.Layer.clone() not returning a unique Layer object

I'm taking a layer (layer_orig) and calling the clone method to create a new layer (layer_clone) with same features, styles, etc. I am changing the name and map instance of the layer with: ...
2
votes
1answer
2k views

How to use OpenLayers cluster strategies without using a Protocol

Using OpenLayers with Bing maps, I'm trying to load JSON data from a service URL and assign an array of clustering strategies to the resulting layer. There are plenty of examples of using cluster ...
0
votes
1answer
724 views

Showing custom markers, shadows and popups from json data

The examples given in the documentation of Open Layers show very basic ways of utilising the different features. This example shows how to add shadows to the marker. This example shows how to create ...
1
vote
1answer
3k views

How to use getfeatureinfo with MapServer and OpenLayers?

I'm trying to use the getfeatureinfo function of Openlayers with MapServer. When I click on a point on my map, I get the following error in Firebug: <?xml version='1.0' encoding="ISO-8859-1" ...
0
votes
1answer
446 views

Openlayers loop through json array and output result with as javascript

Connection.php file which stored database connection code with json: <?php $username = "root"; $password = ""; $database = "roadmap"; $url = "localhost"; $con = mysql_connect($url, $username , ...
6
votes
1answer
735 views

What is the difference between projection and displayprojection for a Map in OpenLayers?

I am familiarizing myself with Openlayers, and am having trouble with understanding the projection and displayprojection properties for a Map. When the map is initialized with the following code: ...
1
vote
1answer
116 views

Why does an OpenLayers map.getNumLayers() return 0 even though I've added a layer?

When I try the following code, OpenLayers returns a zero result. What have I done wrong, here? var map; function loadMap () { // Based on example code: view-source: // ...
2
votes
1answer
80 views

How to put image over the layer in OpenLayers

How to set the Latitude and Longitude range that focuses on a specific region in Mercator Projection when the layer loads in OpenLayers API ? Is there any way to put image over the layer?
1
vote
2answers
821 views

Is it required to use BBOX strategy with WFS protocol in OpenLayers?

is it a must to use BBOX strategy with WFS protocol in Vector layers ? I cannot display this layer without BBOX strategy: vLayer = new OpenLayers.Layer.Vector("Test", { styleMap: new ...
3
votes
1answer
715 views

Can't get MapServer WFS to display in OpenLayers

I'm new to OpenLayers and MapServer and I'm trying to serve a shapefile through a WFS but can't seem to get the data to display. When I use Firebug and HttpFox in Firefox I seem to be getting some ...
1
vote
1answer
286 views

How to get map to parse input bounds as degrees?

I just started to learn Open Map and I am having some difficulty working with the API. This may look trivial, but please bear with me. I am trying to get Open Map to display a region of the map ...
1
vote
2answers
1k views

How to uncheck a layer in LayerSwitcher on map load?

I have four layers in the LayerSwitcher. When the map is loaded all the layers are checked by default. I do not want to show all Layers as checked.How do I uncheck a layer when the map is loaded?
2
votes
4answers
826 views

problem in reading kml data in openlayers

I am trying to read an KML file (point feature) and show it on a vector layer on OSM as the base map. My code seems to have a problem that does not show the features on the map. I don't now if its the ...
2
votes
1answer
117 views

Java or .net platform is good for creating interactive web page [closed]

I have just now completed my degree in Spatial Information Technology, and learned how to use the ARCGIS platform and QGIS. Now I wanted to create a server/client webpage using mapserver for a project ...
3
votes
1answer
717 views

toggle clustering with map controls

I've made a map with openlayers and have the vector features clustered with a clustering strategy. Now I want my users to be able to toggle this behaviour with a control similar to the layerswitcher. ...
0
votes
1answer
774 views

how to read/write XML file using Openlayers?

I am new to OpenLayers. I am trying to load data from a datasource and show it on a OSM map, then also add the functions such as tagging and making new features as well as editing their attributes. My ...
1
vote
0answers
84 views

OpenLayers doesn't understand Mercator map measured in degrees?

I have access to a map server that takes a bounding box measured in degrees, and returns a map, projected in Web Mercator. I'm having trouble configuring OpenLayers to use a Mercator projection that ...
1
vote
1answer
255 views

How do I overrideMimeType in Openalyers.Request.Get

I can't find any info on this. When performing a GET request with the following format, I cant figure out how to add the request for "overrideMimeType("application/xml")": request = ...
0
votes
1answer
85 views

trying to create array reader for feature fields

I am trying to create a functionality that creates array data for any layer that user selects. Now I am able to get all the data in the feature layer that the user selects but I am having some trouble ...
2
votes
2answers
2k views

zoom to cluster onClick & have hover event

I've made a simple mock-up trying to combine two openlayers examples. I want to have clusters on which I can hover (so I can display an infowindow about it's content) and I want users to be able to ...
4
votes
1answer
3k views

Openlayers display a markers popup using a button out of the map

I have the following code which addes 3 markers to the map along with there popup boxes what I want to do is have a list of location at bottom of page and using the id of the marker when click a place ...
5
votes
2answers
2k views

Create multiple vector layers by reading a GeoJSON file once in OpenLayers

I am a begginner to OpenLayers, and my question is about making things more efficient. My work is about displaying time-dependent weather elements on several point locations on the map. All these ...
1
vote
0answers
482 views

OpenLayers dynamic zoom levels

In my application i add layers dynamically. The first added layer is a baseLayer. When i add layer i extend bounds so the new layer could fit map (it works). The problems is that i don't know how to ...
1
vote
1answer
1k views

Editing layers in geoserver with web application

I wanted to edit layers in geoserver where they are store in PostGIS database. I have refereed ...
1
vote
1answer
319 views

ArcGIS Reference Layer over ArcGIS Terrain base(or Imagery) Layer using OpenLayers

I am using Openlayers for a Map application which uses basemaps by ESRI (or ArcGIS). What I am trying to achieve is something like this: http://www.arcgis.com/home/webmap/viewer.html From Basemaps ...
2
votes
0answers
308 views

Openlayers, valid zoomlevels are offset by 1 level. Why?

I have an openlayers based web app, map object is initalized like this: p4326 = new OpenLayers.Projection('EPSG:4326'); p3857 = new OpenLayers.Projection('EPSG:3857'); //initialize map object, bind ...
3
votes
1answer
2k views

Cant see WFS-T layer with OpenLayers and GeoServer (Windows)

I am trying to implement a simple test of a OpenLayers + WFS-T + GeoServer -setup. I have followed the instructions by populating PostGIS and configuring GeoServer, and can see the WFS-T layer data in ...
3
votes
1answer
141 views

color code wms maps

I have various WMS map layers showing state/province capitals and various lower level administration (eg. district) head quarters. I want to demarcate the state capitals and district head quaters ...
2
votes
1answer
850 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 ...
3
votes
0answers
449 views

Openlayers 2.12 + Firefox 15 = OSM Layer not showing

I know it's due to the new Access-Control-Allow-Origin in OL 2.12, but it is still not functional to me. I've followed instructions on here on stackoverflow. Firefox version 15.0.1 Apache2 config ...
1
vote
3answers
2k 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 = { ...
6
votes
1answer
358 views

How To Do OpenLayers.Mobile Popup

It seems that the OpenLayers.mobile.js library (v 2.12) doesn't have a popup class. Does anyone know how to do a popup with the mobile version? I'm using some code that i ported over form normal OL ...
4
votes
1answer
999 views

OpenLayers Map with custom SRS (without EPSG code) [closed]

Is it possible to show geodata by OpenLayers in custom projection? I want to show my geodata in OpenLayers interface. Source layer(s): shape-file(s), standard epsg:4326 lon/lat projection; ...
6
votes
5answers
1k views

Deactivating Openlayers Cluster after a certain zoom level

I want to deactivate the cluster strategy after zoom level 16. The Cluster strategy gets deactivated and I also change the style of the original features and redraw the layer. But still it takes the ...
2
votes
1answer
2k views

How to change an OpenLayers vector layer from automatic to manual get request?

I have a web server that returns a FeatureCollection in JSON. I was getting this using the code below, which works perfectly: var vectorLayer = new OpenLayers.Layer.Vector('geoJSON', { ...
0
votes
1answer
1k views

Requesting remote data using openlayers for multiple URLS and storing respose value according to URL

I have problem creating feature count window. I have urls stored in as json object. I iterate it with jquery and send request to remote data. The I have featureStore which is initially set to 0. When ...
1
vote
0answers
181 views

Project tiles from custom imagery in transverse mercator with OpenLayers

I have the following parameters of a custom imagery and I need to set-up a layer in OpenLayers with which I would project the tiles properly from this imagery. TransverseMercator ellipsoidName=WGS84 ...
4
votes
2answers
2k views

How to collect data via WFS and Popup

I have a map with a WFS-Layer and I am able to add Polygons to my data stored in a PostGIS-database, served with Geoserver (Openlayers, Geoserver 2.1.4, PostGIS 2.0 for PostgreSQL 9.1).) How can I ...
4
votes
1answer
6k views

OpenLayers Hide/Show Layers from external checkboxes

I'm using OpenLayers with mapserver to display a lot of raster images and queryable wms layers. Everything works fine, the layers can be turned on/off in the OpenLayers layer switcher...But now I want ...
2
votes
2answers
253 views

Drawing a rectangle that will always be on certain area of map

Using OpenLayers is it possible to draw a rectange that will always be on one portion of map without regards to zooming and panning of map?
2
votes
0answers
204 views

Displaying text from dxf in Openlayers

I managed to import .dxf into Postgis table, and now have, among others, rows with Point geometries and values in text column (which corespodent with Label values from ACAD .dxf). What is the best ...
0
votes
1answer
2k views

How to Obtain the feature attributes from feature collection

I am able to obtain the features of the layer which is selected by the user in the Layers table and then intersected by a user defined polygon, using e.features. I was able to obtain the attribute ...
1
vote
0answers
822 views

searching GeoJSON features

After googling for many days and reading the OL documentation, I don't understand well how the filterToParams in OpenLayers.HTTP protocol should work, what I'm trying to do is to find and display the ...
3
votes
3answers
3k views

local tiles server for offline access

Anyone knows if there is a "lightway" solution to mount a local tile server? Feature I'd to provide is local storage of small sections of maps, not more than small city for example, in order to ...
3
votes
2answers
465 views

Design question: what's the role of WFS-T in this kind of webapp?

I have more experience in "traditional" (Java EE) webapp development, and I am trying to figure out a decent design for a mapping web application. My application has a map, and users can see and edit ...
6
votes
4answers
3k views

Best solution for printing Google Maps?

What is the best solution so far for printing Google Maps as a base layer of Vector layers in Geoserver/OpenLayers application ? I used to print WMS layers using GeoExt print page example, but when ...