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
1answer
204 views

openlayers and geoext

I have created a WMS layer in geoserver. I have added that WMS layer using openlayers and geoext. The WMS layer is displaying, but when I zoom in, the layer disappears and when zoomed out the layer ...
0
votes
1answer
2k views

how to put marker on particular lat,long in openlayers?

I am unable to put marker on specific lat,long here what is i am trying.. <script src="http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.11/OpenLayers.js"></script> <script> ...
1
vote
0answers
28 views

Function access to surrounding object's variable

var CreateFeature = OpenLayers.Class(OpenLayers.Control, { clazz : "xyz", set_item : function(e) { var position = map.getLonLatFromPixel(e.xy); var latitude = position.lat; ...
-3
votes
1answer
131 views

what is the basic programming language or code language for raster swipe tool? [closed]

How to develop a Swipe tool for rasters or vectors (Spatial layer) like openlayers or ErdasImagine. Can any one give me the references please
1
vote
1answer
135 views

Geometry column of new feature is not stored

var saveStrategy2 = new OpenLayers.Strategy.Save(); var vectorLayer = new OpenLayers.Layer.Vector("Vectors", { strategies : [new OpenLayers.Strategy.BBOX(), saveStrategy2], protocol : new ...
0
votes
1answer
494 views

Equivalent of OpenLayers 2 ol.Layer.Text in ol3 (to show POIs)

I have this OpenLayers 2 code that I want to convert to OpenLayers 3: var pois = new ol.Layer.Text( "My POIs", { location:"/media/pois.txt", projection: ... } ); map.addLayers([ ...
5
votes
3answers
1k views

prevent osm to load tiles on zoom level > 19

layer_osm = new OpenLayers.Layer.OSM( "Simple OSM Map","",{ isBaseLayer : true, displayInLayerSwitcher : false, numZoomLevels: 26, }); I have several WFS and WMS Layers on ...
1
vote
1answer
455 views

Geoserver Mapfish Print Fails

I use Geoserver 2.8.1, Openlayers 2.12, GeoExt 1.1 on a Windows machine. I can successfully print a map using the Print Provider below: var printProvider = new GeoExt.data.PrintProvider({ ...
1
vote
1answer
378 views

I can't tell if my GeoJSON file is too large for openlayers

I am a bit new to this GIS thing. I have shapefile that I fed to geoserver in order to retrieve a GeoJson file. I was attempting to display this on openlayers, but it won't show anything. The file is ...
4
votes
2answers
921 views

Openlayers 3 connecting to a wms feed with a different projection

I am trying to incorporate a wms feed in the British national grid projection (EPSG:27700) into a openlayers 3 project. I initially had used this wms layer in an openlayers 2 application using the ...
1
vote
0answers
420 views

Multiple geometry types layer in Geoserver?

I am using OpenLayers and Geoserver in a web map application in which I'd like to implement editable layers by drawing features on it. I followed this tutorial to save the created features with WFS-T ...
0
votes
1answer
153 views

Cannot remove last Point from Cloned Geometry in OpenLayers (in DynamicMeasure.js Control)

I am working with OpenLayers-2 and currently can't figure out why I cannot remove the last Point from a cloned LineString-geometry. This is my original geometry, a LineString with three points and ...
1
vote
0answers
161 views

set OpenLayers.Map extent dynamically

if (workspace=="x") { bbox = [3461431.90483,5555489.54044,3461896.81256,5555951.68634]; } else if (workspace=="y") { bbox = [471730.87469,5524059.31339 ,472552.36397,5524962....
2
votes
1answer
816 views

Yandex Traffic layer position issue with using openlayers

i have got issue about traffic map with using openlayers library. Traffic layer shifting from sublayer. so roads and streets are mismatch. can you help me please. in jsfiddle The code from the ...
3
votes
3answers
502 views

Projection offset between layers: OSM, GeoJSON

Don't know why there is an offset: The coordinates of the points that appear on the example were gotten through google's geocoder from some Rosario, Argentina directions. I have checked the lats and ...
1
vote
0answers
369 views

Problem with previewing layer on geoserver ( instead of downloading wms file ) [closed]

When I hit OpenLayers to preview my layer in Geoserver, instead of opening a new tab with OpenLayers it automatically downloads a wms file I just opened the wms file and says : <?xml version="1.0" ...
2
votes
0answers
63 views

Trigger event after KML Layer completely loaded

I want to set the bounds of my map after a Vector (KML) Layer is loaded. kmllayer.events.register('refresh', kmllayer, function(evt) { map.zoomToExtent(kmllayer.getDataExtent()); }); In the ...
3
votes
2answers
3k views

QGIS Desktop 2.12.3 WebApp Builder

I want to use the WebApp Builder in QGIS 2.12.3 But I can not find the QGIS Web App Builder in my QGIS version 2.12.3 Like this one: http://boundlessgeo.com/2015/06/building-openlayers-3-web-app-...
1
vote
1answer
513 views

Display local tiles with OpenLayers that are generated by MapTiler from a (.tif) georeferenced image

I'm working on a mobile app and trying to use my locally stored tiles that I generate using MapTiler software. after tiling my image.tif I have many folders of png images and two other files: ...
0
votes
1answer
70 views

Styling in OpenLayers2: unknown symbol name

I'm using Geoserver 2.8.1 and OpenLayers 2 to visualize cartographies, the geoserver documentation indicates I can use extra symbols in my SLD, the "shape://oarrow" for example : <Mark> <...
1
vote
0answers
71 views

OpenLayers 2 with different projection is giving blank page

The code does not give any exception but nothing appears in the browser. This code works with EPSG:4326. Is this the correct way to define projection? See below for the full code: function init() { ...
1
vote
1answer
695 views

OpenLayers 2, JSON vector through WFS

Consider this example, https://geoext.github.io/geoext2/examples/grid/feature-grid.html It uses protocol: new OpenLayers.Protocol.HTTP({ url: "../data/summits.json", ...
2
votes
0answers
23 views

layer styling switches after zooming in with no reason

Does anybody have an explanation how it is possible? I have a strange trouble on the following map. The surrounding land layer, which is only a one polygon layer and is styled normally like: var ...
1
vote
1answer
323 views

QGIS Essen 2.14.0 OpenLayers plugins running Windows 7 64 bit

I cannot make any OpenLayers plugin visible for the part of the world for which I plot vector points. I set CRS to WGS 84 / Pseudo Mercator. After adding a layer of points it should be trivial to ...
1
vote
1answer
435 views

How to create a choropleth map from a very Large geojson using Openlayers?

I am trying to create a choropleth map using OpenLayers 2 api from a Geojson file that has a size of about 229 mb. I have used the mapshaper tool to simplify the polyogns in this json to about 19 mb. ...
-3
votes
2answers
300 views

How to the display the information in an OpenLayers popup as a two column table?

My pop-up info in OpenLayers is showing its information horizontally (see screenshot below). I would like it to display vertically instead. Is it possible?
1
vote
0answers
116 views

How do I increase the 2mB uploadifive limit in Geoserver installed on AWS?

I've recently migrated a site from Geoserver 2.1.4 installed on a hardware server to Geoserver 2.7.0 installed on an Amazon Web Service. The site uses uploadifive to enable the user to upload a pdf to ...
1
vote
0answers
356 views

How to getfeatureinfo results in a column than a row from geoserver postgis openlayers

Below is a snippet of a code I modified from openlayers. Basically, I click on a wms map and data from postgis is queried by geoserver and served on a single row table. There are 11 variables in the ...
1
vote
0answers
267 views

GeoServer web application

I'm trying to create a web application using GeoServer. When I try to see the file var/lib/tomcat8/webapps/geoserver/data/www/ol-demo.html, no map appears, just the title "GeoServer OpenLayers Demo" ...
2
votes
1answer
2k views

Geodjango with Geoserver and Openlayers

I am trying to teach my self Django and its spatial extension geoDjango. There is one thing, which is still a bit foggy in my mind. When using the trio: Postgis, geoserver, openlayers is perfectly ...
2
votes
1answer
897 views

Displaying KML Extended Data in OpenLayers?

I have just got a problem displaying extended data from a KML file in OpenLayers 2. I hope you can help me with this issue. I have already searched for a solution, but I do not find a real solution ...
-1
votes
1answer
443 views

GetFeatures from WMS using angular-openlayers-directive

How do I get features from a WMS layer using angular-openlayers-directive? I've been trying to figure that out, but can't find a way to do it.
2
votes
1answer
81 views

Need Help on Multiple External SLDs for GeoServer LayerGroup

I have a layer group called "basemap" in my GeoServer made up of 3 layers but their SLDs needs to be styled dynamically so I have decided to create a XML web service for the external SLDs but I am ...
2
votes
0answers
141 views

OpenLayers measurment path in 31700 projection

I have this code who works great for distance measurment on 900913 projection with 4326 display projection (bing maps + layer WMS): measureDistanceControl = new OpenLayers.Control.Measure( ...
0
votes
1answer
223 views

OpenLayers Get Opacity

I understand how to set opactity to a map layer in OSM but how do you get the opacity? Perhaps something like layer.getOpacity() OpenLayers.Util.getElement('opacity').value = layer.??? I have ...
-1
votes
1answer
44 views

Openlayers service displaced

I'm working on QGIS with a shapefile (datum is ED50 or ETRS89). When adding the OpenLayers satellite service layer, it is displaced generating an error of about 2m from west to east, and doesn't have ...
1
vote
0answers
238 views

Running basic JavaScript in KML to be viewed through OpenLayers API

I am trying to build an application in which points can be loaded on OSM map using KML called through OpenLayers with a balloon popup on each point. I am using the sample Sundials application: http://...
1
vote
1answer
149 views

Is there a method to prevent a getfeatureinfo event listener to listen on certain conditions?

I am working in OpenLayers 2, setting up a WMSFeatureinfo Object that has both 'beforegetfeatureinfo' and 'getfeatureinfo' event listeners. In the response I want to strip out all the WKT for the ...
1
vote
0answers
100 views

WMS Layer Properties

I have created a gxp client where I have added some layer in the initial map settings and some layer can be added using gxp Add Layers plugin. When I add these layers to the map there is no issue with ...
4
votes
2answers
3k views

How to convert non Web-Mercator coordinates to the tile Y, X, Z coordinates?

I just found that leafletjs and openlayers have two different conventions to convert coordinates from EPSG:4326 (WGS 84) to tile names ({Z}/{X}/{Y}). Thus I would like to have more information about ...
1
vote
1answer
463 views

Requesting a shapefile from geoserver and displaying it on a website that runs openlayers

So I've taken over a project from two other programmers as a part of my internship and I'm having a little trouble pinpointing why a part of it isn't working properly. The website itself is a very ...
2
votes
0answers
976 views

How to add CQL filter into GetFeatureInfo request in OpenLayers

I have made a WMS layer using Openlayers2 and Geoserver and I display the layeer using a specific CQL filter. Now I want to use a WMSGetFeatureInfo request in order to get specific data on click. ...
0
votes
1answer
184 views

Geosearch Esri controls in leaflet

It is possible to disable the Geosearch Esri controls in leaflet after the first geocode search? When I run Chrome console and I select the search geocode icon this is the code: <input class="...
3
votes
1answer
1k views

How to quickly change EPSG in QGIS (Openlayers; 4326 vs. 3857)

I'm using Qgis 2.12.2-Lyon on Ubuntu 14.04 LTS. With the OpenLayers plugin I added some OpenLayers to my Canvas. I usually use the WGS 84 (EPSG:4326) projection for my project, but I have to switch ...
0
votes
1answer
342 views

Keep only the last marker when geolocating

I'm working with OpenLayers 2 and I managed to create a javascript to locate the users and it works fine. I added a marker representing the current location and when the position change, it creates a ...
2
votes
0answers
366 views

SQL View- WMS Viewparams - parameter for table name [closed]

I've made a SQL view using parameteres. So, I did something like this: SELECT * FROM '%tablename_parameter%' The view is requesting data from a table by a parameter inserted from web page. The ...
0
votes
0answers
315 views

Increasing Clickable Area of OpenLayers Polylines

I'm currently working on a web application where there are OpenLayers geometries that are clickable. However, since the size of the geometries can be rather small, it can be hard to click on them. ...
0
votes
1answer
51 views

Modifying OpenLayers 2 to connect to different WMS using JavaScript?

I have a program that runs in tomcat and uses JavaScript to access a postgreSQL database as well as Google, Yahoo, Geoserver, and Open Street Map map services through OpenLayers 2.12. I would like to ...
3
votes
0answers
383 views

making attributes popup on click in openlayers

this is my code i have included the control for get feature info but it seems like it's trying features for all the layers. how do i specify which layer to display the attributes var bounds = new ...
1
vote
0answers
79 views

Problem with OpenLayers plugin [duplicate]

I use QGIS in my daily work, but since a few months back I'm unable to do this due the OpenLayers plugin no longer being functional. When I try to load a background map nothing happen - the canvas ...