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

learn more… | top users | synonyms

1
vote
2answers
519 views

Make Openlayers request WMS tiles only within a certain bounds

Is there a way to actually tell openLayers not to request tiles out of particular bounds? I want the rest of map and other layers still accessible, so maxExtent on map is not an option for me. I ...
2
votes
1answer
60 views

What is the purpose of having a separate Layer property for sphericalMercator?

The Beginner's Guide to OpenLayers 2.10 says the following: sphericalMercator {Boolean} This property determines if the map should behave as a Mercator-projected map. Setting this to true ...
1
vote
2answers
487 views

How to edit using a WFS service, without showing it on the map in OpenLayers?

I have a service with about thousand points. I wish to enable the user to edit the attributes of the features. Since there are so many points, I don't want to display them as a vector layer (using ...
3
votes
1answer
265 views

Why are two incompatible projections used together in OpenLayers? [duplicate]

While going through the examples in OpenLayers, I notice several examples with the following code: map = new OpenLayers.Map('map_element',{ ... units: 'm', projection: new ...
1
vote
1answer
660 views

OpenLayers / Mapserver WFS Filter: <gml:null>missing</gml:null>

I'm trying to filter features in OpenLayers when moving a JQueryUI slider. It works like this: EDIT: full files available here on GitHub. JQueryUI slider When moving the slider cursor, minSelection ...
1
vote
1answer
90 views

How do I get the coordinates of a click on vector feature/layer in OpenLayers transformed to another projection system?

I need to get the coordinates of the click when the user clicks on any place on the base map. I have checked the answer to similar problem here: How do I get the coordinates of a click on vector ...
2
votes
2answers
1k views

how to display map center coordinate using openlayers

As far as I know that openlayers can display our mouse coordinate position. However, I do not know how to display map center coordinate? Can anyone help me? thanks for your helping guys!
0
votes
1answer
326 views

What would be the URL of a JSON file on the local drive?

When i save json file in web apps then using http://localhost:8080/WGSClient/js/object.json this path file gets open.But when i keep it outside web apps like local folder then using same url format ...
3
votes
2answers
2k views

How to 'highlight' a selected country?

All, Over the past several days I've read as much as possible regarding the OpenLayers API (within a JavaScript/jQuery environment), yet I'm still having trouble in getting my head around what I ...
3
votes
1answer
207 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
156 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
182 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
733 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
457 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
780 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
81 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
827 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
726 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
290 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
838 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
118 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
741 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
792 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
85 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
257 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
86 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
494 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
328 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
315 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
142 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
867 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
456 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
365 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
1k 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
187 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 ...