Questions tagged [openlayers-2]

Use this tag when you are using version 2.x of the OpenLayers JavaScript client toolkit.

Filter by
Sorted by
Tagged with
1
vote
0answers
125 views

Create a slide to control opacity for layers [closed]

I am starting with my programming skills. I m self learning so I am stuck in this point I am trying to create a web map where charge few different layers (wms) but I would like to give functionality ...
0
votes
0answers
82 views

I would like to add a google base layer to my openlayers map but it load correctly

This is my script at the top of my HTML file <script src="http://www.openlayers.org/api/OpenLayers.js"></script> <script src="http://maps.google.com/maps/api/js?v=3&amp;sensor=...
0
votes
1answer
128 views

One layerswitcher option to open two wms layers

I have two WMS layers Martello_Towers and Martello_Towers_Range. Rather than have two options in Layerswitcher I would like one option to control both layers. They are both in the same projection. I'...
1
vote
0answers
132 views

OpenLayers 2.13.1 - edit and export GeoJSON property values

I have created an application with OpenLayers 4.1.0 that imports GeoJSON vector data, allows selecting of polygons, changes "processed" property value of selected polygon from 0 to 1 and prepares ...
1
vote
2answers
271 views

OpenLayers 2 Cluster - style rules 'property' value

I am using a cluster vector layer and have a doubt about the value of 'property' in rule. My code is: rules: [ new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ ...
2
votes
1answer
314 views

OpenLayers 2 - move vertex programmatically

is there a correct way to move a single vertex programmatically in OpenLayers 2? The problem is, I need to prevent users from drawing invalid (eg. self-crossing) polygons. To do that, I created a ...
0
votes
1answer
303 views

Display a wms layer automatically along with base layer?

I have a OpenLayers map that displays a few WMS layers on top of an Open Street Map base layer. I'm would like the county boundary WMS layer to display automatically along with the base layer when the ...
0
votes
1answer
177 views

Geodjango, Openlayers 2: Override default fillColor in OpenLayers.Feature.Vector.style

Update I would certainly hard-code the source file and change it as follows: OpenLayers.Feature.Vector.style = { 'default': { fillColor: "blue", ... }, ... ... but this ...
0
votes
1answer
386 views

No such Feature Type error

I am trying to insert a Layer with WFS-T and getting an error. I am using ol3 and want to insert data to my database using WFS-t so this is the GML I defined to do so : formatGML = new ol.format.GML({...
1
vote
0answers
76 views

OpenLayers 2 WMS CQL_Filter with diacritic

I´m using GeoServer where I can query WMS services to get image from a CQL Filter query. The URL for the service looks like: http://myserver/ows/LIMITS_ADM/wms?LAYERS=LIMADM_MUNICIPI&TRANSPARENT=...
1
vote
0answers
234 views

Base layer in OpenLayers 2/3

I know in OpenLayers 2 there is the concept of "base layer", which can be set by map.setBaseLayer(layer). But I am not sure which effect this has and if there is an equivalent in OpenLayers 3. Can ...
0
votes
1answer
306 views

wfs layer is displaying in ol3 but not in openlayers 2

I am working in openlayers 2. I want to diaplay wfs layer in openlayers 2. But it is not displaying. When i tried the same in ol3 it is working fine. But my whole project is in openlayers 2. So i want ...
0
votes
2answers
388 views

Adding styles to WMS layer

I have added a WMS layer to the map. Now I want to add styles to the WMS layer using filters. I have tried with the below code but it is not working var poilayer = new OpenLayers.Layer.WMS("poi", ...
1
vote
0answers
66 views

Resize Polygon just by outer edge using OpenLayers 2?

I am writing a program in openlayers2 of polygon resizing. So resizing function take two parameters 1.Scale and 2nd Origin. So my problem is I don't want to resize by taking origin. I want to change ...
0
votes
1answer
304 views

Making circle onClick of mouse using OpenLayers 2?

I am new in Openlayer2 . I want to make a circle on click but my code making a marker and a random generated circle. You can check on code here https://fiddle.jshell.net/sm1g1hxz/ <!DOCTYPE ...
0
votes
1answer
693 views

Get BBOX values from a WMS GetCapabilities response with OpenLayers 2

I am using the below code to get the BBOX values: wms = new OpenLayers.Format.WMSCapabilities(); OpenLayers.Request.GET({ url:"http://localhost:8080/geoserver/wms?service=WMS&version=1.1.1&...
2
votes
1answer
361 views

How can I get legend from Arcgis MapServer url

İs it possible to get legend item from arcgis mapserver or feature url. For example http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer I can use ...
2
votes
0answers
395 views

TMS tileOrigin on Google Maps ImageMapType

I'm trying to show a tiled image layer on Google Maps, which is currently showing on an OpenLayers / ESRI engine. OpenLayers has a parameter on a TMS layer to specify tileOrigin (0,0 is different) ...
0
votes
1answer
161 views

LonLat values returning from Openlayers 2

I have developed an app using Openlayers 2 to retrieve the latitude and longitude values based on the clicked position. The map display the area of Great Britain and Northern Ireland. Below the ...
2
votes
1answer
67 views

Can we use PostGIS functions in Openlayers?

i have a traffic data (vehicles gps location(Point)) for every minute in a specific location sample data : Vehicle_No , Long, Lat and i need to show the real time traffic for that specific location ...
1
vote
0answers
231 views

Add GML Vector Layer to OpenLayers from String (Variable)

I am trying to add a vector layer to a map, wich is working fine if included like this: var gmlfeature = new OpenLayers.Layer.Vector("GML", { protocol: new OpenLayers.Protocol....
3
votes
1answer
463 views

Openlayers(with proj4.js) transforms coordinates incorrectly

I encountered a strange behaviour in Openlayers(2) while transforming a point from EPSG:4326 to EPSG:31467. The Input lat/lon in EPSG 4326 is: 48.002718, 7.841573 This is the output in Openlayers: ...
3
votes
3answers
180 views

Triggering the retrieval of a feature on a feature layer by something other than click using OpenLayers 2

I have added a feature map to my OpenLayers 2 map, by using the following code. When I click a spot on the map, it correctly retrieves the feature name for that place according to the feature layer. ...
1
vote
0answers
252 views

Using OpenLayers to work with REST from ArcGIS ImageServer

I already have ArcGIS Image Server for publishing raster data to my users. I have a third party application that will allow me to add a custom web map as a base layer using OpenLayers2. I have found ...
3
votes
2answers
1k views

Convert point to lon lat openlayers 2

I'm trying to make an alert window show the current mouse coordinates in openlayers 2 using the google maps projection EPSG:4326. Essentially like this post but in openlayers2. But its not working ...
1
vote
0answers
540 views

Indoor mapping data structure

I wanted to know, are there any formats/data structures made specifically for indoor mapping? I have looked at OpenLayers + GeoJSON however: How will I sync up the coordinates of my local map and the ...
1
vote
2answers
398 views

Setting EPSG for OpenLayers 3

I'm currently trying to create a map based on GeoServer and OpenLayers 3. My main issue at this point is the coordinate system. I want to use EPSG:25832 (EUREF89 Zone 32). This is how far I´ve got: ...
1
vote
0answers
644 views

Extracting attributes from WMS layers in OpenLayers

I am serving up a WMS layer from GeoServer in OpenLayers and am trying to extract a specific attribute from an object in this layer when I click on the map. I am defining my WMS layer like this: ...
1
vote
1answer
323 views

How to send multiple value for one param to mapserver through openlayers (encode_uri)

Here's my filter on Mapserver's Side : PROCESSING "NATIVE_FILTER=(ct in ('%ct%'))" It allows me to select several values for my column. My validation looks like : VALIDATION 'ct' '^[a-zA-Z\-]+...
0
votes
1answer
479 views

Merging multiple polygons to one polygon in shapefile

How to merge multiple polygons to one polygon in the shapefile using openlayers and geoserver. ie in the portal if user selects the multiple polygons in the same boundary, it has to merge as a single ...
1
vote
1answer
2k views

How to fit an OpenLayers view to an extent that spans the map extent (wrap) or IDL?

How to fit the view to an extent that spans the map extent (wrap-point) or IDL? Please excuse my semantics if they are incorrect, I'm new to GIS. I've set up some code that does a zoom to extent ...
1
vote
0answers
445 views

OpenLayers getfeatureinfo shows all features, even with CQL filter

I have a map with several CQL filters that a user can use in my website. When the user applies the CQL filter, I want them to be able to use getfeatureinfo which only shows features from the CQL ...
1
vote
1answer
193 views

Polygon not showing

I am trying to draw a polygon on my map but it's not showing, I do not have a js error on the console... Here is the code : var style = { strokeColor: "#00FF00", strokeOpacity: ...
0
votes
1answer
451 views

Stop click event on input field to be propagated to map layer

I have a simple html text input field within a panel on top of an OpenLayers Map. Everytime I click in the input field, the click event gets propageted to the map. I want the click event not to be ...
1
vote
1answer
148 views

How to load(preload) Geojson with JS before start another script?

I need to load my Geojson file before start my script . I need to load file before start this script : var geojsonPrecitany = false; var geojson = $.getJSON("./tematicke_vrstvy/tematicka_vrstva....
0
votes
2answers
987 views

Adding GeoTIFF to OpenLayers 3? [closed]

I am a newbie in mapping services. I have some GeoTIFF files that I am trying to put on my OpenLayers 3 map. However, I am not finding a solid answer about putting a GeoTIFF on OpenLayers 3. I ...
3
votes
1answer
914 views

searching by property's value of geoJSON in OpenLayers

I have a map with 4 layers with the same attributes (not even the same values). an example of geoJSON is below: { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 0, "properties"...
2
votes
0answers
241 views

Consuming GeoServer UTFGrid output in OpenLayers 3 ol.source.TileUTFGrid results in error processing response object

GeoServer now supports UTFGrid outputs for layer services. This is great however the support for consuming them seems incomplete in OpenLayers 3. I set up a simple map to attempt this but can't get ...
2
votes
0answers
355 views

OpenLayers 3: disabling interpolation when loading ol.source.ImageStatic

I want show a PNG layer like this example What I actually get is a smoothed image This is unrelated with the zoom level because when I zoom in or zoom out the image keeps unchanged. So I suppose it'...
1
vote
1answer
123 views

Integrating OpenLayers.Layer.ArcGIS93Rest layer on OpenLayers 2 map where base map uses different projection

OpenLayers 2 has a layer subclass called OpenLayers.Layer.ArcGIS93Rest which is great but it is passing BBOX parameter in Google Projection (EPSG:900913) which is what my base layer uses, instead of ...
1
vote
0answers
256 views

Binding WMS layers fields with store from geoserver to a combo box using geoext,extjs,openlayers and geoserver?

I am working on opensource can anyone help me in How to bind wms layers fields with store from geoserver to a combo box using geoext,extjs,openlayers and GeoServer? I am facing problem in binding the ...
2
votes
1answer
2k views

Openlayers 3 heatmap with weight function

I have created an OpenLayers 3 heatmap. Because my weight column is not in the range 0-1, I need to use a function to divide it by the maximum value (which I know). I am doing the following: var ...
4
votes
2answers
175 views

How to identify features in an OpenStreetMap layer in QGIS 2.16?

I want identify features in a OSM layer. I saw this tool here OSM Feature widget Where I can find it? Is still in use or is there another option?
5
votes
1answer
7k views

Access-Control-Allow-Origin Openlayers WFS

I try to use a WFS service with OpenStreetMap to request GeoServer GeoJSON file. First I had a error message on the Firefox Cross-Origin Request Blocked: The Same Origin Policy disallows reading the ...
2
votes
1answer
795 views

WMS layer not displaying in Leaflet Time Dimension

I have a postgis table which is uploaded in Geoserver as WMS. The table is of a road ,has timestamp and contains around 250 records at 5min interval. It looks like this in openlayers Now i want to ...
0
votes
2answers
1k views

Openlayers 3: Draw Polygon (convex hull) around a cluster of points

I'm grouping a set of points as a cluster. Then I'm trying to draw a polygon around the points. Please see this link: Draw Poly I tried by sorting the points based on co-ordinates. But still I'm not ...
1
vote
0answers
143 views

Showing ESRI Historical Topographic maps in Openlayers

I'm trying to show a Dutch historical map (see www.topotijdreis.nl) in Openlayers. However when I load the map it tries to load the tiles but the all give a 404 error. I'm guessing it has something to ...
0
votes
1answer
868 views

Display basic geoJSON polygon on OpenLayers map

For some reason my basic polygon, which I've verified on geojsonlint.com, won't display correctly on the map. Looks like a projection issue, but I can't determine what I missed. I'll paste the code ...
0
votes
1answer
180 views

Drag issue on an OpenLayers map inside a draggable div

I am new here, so I hope I am doing it right. I have a similar question as Drag issue on an OpenLayers map inside a jquery ui draggable div But I need to go a step further. I have created a setup ...
0
votes
1answer
299 views

filter points in a geoserver layer

So, I have a geoserver layer with point markers (POI) in several category such as ATMs, churches, government buildings, parks, etc. Is there a way to filter this layer via URL parameters so I don't ...