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
0
votes
2answers
4k views

How to create local map tiles for OpenLayers 2 offline use?

I have to use my OpenLayers 2 map in an offline stand-alone mode (PC/Laptop disconnected from network). What is the best way to allow easy capture of map tiles for a region of interest, load them ...
0
votes
1answer
94 views

Removing house numbers from OpenStreetMap using OpenLayers? [closed]

I want to remove all the house numbers of the base layer from OpenStreetMap using OpenLayers 2 and if it is posible the points of interest too.
0
votes
2answers
959 views

Multiple layers within a single geojson file

To give some background, I'm working on a project that has quite a few restrictions given the environment it will run in. I need to be able to view and interact with geospatial data, perform ...
1
vote
2answers
8k views

Working with GeoServer and OpenLayers in Android?

I have an application using GeoServer and OpenLayers web platform, but must use the Android OpenLayers offline. My doubt is the following, I can install GeoServer on Android? to work with OpenLayers ...
1
vote
0answers
790 views

Uncaught TypeError: Cannot read property 'split' of null

I am getting this error when i display "name" on the map from geojson for "point" entities. var pointStyle = (function () { var style1 = new ol.style.Style({ image: new ol.style.Icon({ ...
1
vote
1answer
158 views

Keep circle color when overlaping on OpenStreetMaps

(I've asked here: https://stackoverflow.com/questions/38859968/keep-circle-color-when-overlaping-on-openstreetmaps but looks like this site is more specialized). I have a small map web page with two ...
0
votes
2answers
119 views

button background image from databse to external css

I am adding buttons dynamically based on the data in the database and i want to dispaly the buttons with images(each button have differnet images). images path is also defined in the database. my ...
3
votes
1answer
521 views

Losing Grass tools after openlayers installation in QGIS 2.16 [closed]

QGIS 2.16 is running well until I install the openlayers plugin. Then qgis loses the grass connection. After deactivating or uninstallation everything works fine again.
2
votes
1answer
2k views

ZoomIn or ZoomOut on click

I have this map with two controls <!DOCTYPE html> <html> <head> <title>Simple Map</title> <link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/...
0
votes
1answer
126 views

OpenRailwayMap not functioning with OpenLayers 2

I am trying for several days now to integrate a basic OpenRailwayMap into a project using OpenLayers 2 API but it's simply not working. I followed all the steps mentioned here and ended up with ...
1
vote
0answers
193 views

Mixing WMS and vector layers' order

It looks to me that I cannot mix WMS and vector layers' order in OpenLayers 2. I have an ordered map.layers object and assign z-index values to the layers based on order in the object, for example, ...
0
votes
1answer
686 views

Performing intersection of WMS layer with another drawn polygon feature without using GeoJSON?

I have drawn a polygon feature on the WMS base layer, then when I try to intersect the drawn feature and base layer I am unable to find the intersection, but when I have used a GeoJSON layer instead ...
1
vote
1answer
106 views

List of all features inside a buffer (Web map)

I have web map, created in the combination of: ExtJS 5, Openlayers 2, Geoext 2, and Geoserver. My layers are in postgis linked to geoserver. My scenario are 1 base map, an 10 normal layers. Actually ...
3
votes
2answers
1k views

Create Blue Marble XYZ tiles

I am trying to create my own XYZ tiles to use them with OpenLayers 3 as my local tiles. On this example you can see the objective/idea. I want to use the NASA Blue Marble Earth Visible maps, as an ...
1
vote
0answers
136 views

How to tilt/change angle of view/camera from ortho in MapServer or OpenLayers?

I am wondering if there is a way of changing the angle of the camera in MapServer from Ortho to a 60 degree (+-10) angle. Perhaps this is an extensive modulation of Google Maps? I could imagine ...
3
votes
1answer
2k views

OpenLayers 3: Geometric OGC filters

How do I generate geometric OGC filters for use in a WFS GetFeature request such as: <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:Intersects> <ogc:PropertyName&...
2
votes
0answers
1k views

How to efficiently detect intersect between polygons?

So I'm trying to implement box selection in Leaflet. Currently I'm using turf's intersects function to detect if the box intersects with any of my GeoJSON polygon features. However, this is very ...
1
vote
1answer
577 views

How to perform dynamic filtering of multiple check boxes using cql_filter and openlayers javascript?

I have multiple checkboxes for example hospital checkbox where hospital datasets get displayed when checked, phase 1 check box where phase 1 hospitals get displayed when checked and grade A and B ...
0
votes
1answer
65 views

Multiple Selection with OL2

I created a map with some marker which can be selected and have them name appears in an external field. But i even if i am able to select multiple marker on the map ( shift command ), only one name ...
0
votes
1answer
503 views

Mapquest API & OpenLayers markers

Not unlike others, I've found myself forced to edit some code due to MapQuest changing how they offer the openstreetmap data, and using an API Key. Getting the key, aswell as getting up a simple ...
1
vote
1answer
193 views

QGIS OpenLayers OSM plugin not matching with my imported GIS information

I have imported GIS data into a new QGIS project for our local city website. The files are shapefiles and inside the prj it shows: PROJCS["NAD_1983_StatePlane_Florida_East_FIPS_0901_Feet",GEOGCS["...
4
votes
0answers
500 views

Cropping a layer to an input raster

I have layers based on GeoTIFF files, provided by GeoServer, that are displayed as overlays over base maps from OpenStreetMaps, Bing, Google via OpenLayers. I want to mask out areas from the GeoTIFF ...
0
votes
1answer
774 views

How to add drawing over an OpenLayers 3 map?

I am new to OpenLayers 3. I am trying to learn how to draw and save data over an OpenLayers map. Following an example, I am trying to learn about drawing and saving data. However, I am unable to draw ...
0
votes
1answer
735 views

get feature id on click

In my database table there are four fields(lat,lon,sensid,value).i am displaying a vector layer(point feature) by retrieving the lat, lon values from database. Now i want to display the value, ...
0
votes
1answer
684 views

OpenLayers 2 error 404 tile not found

I have a BBOX area of my county. I serving the OSM tiles (Apache 2) from a local disk using openlayers 2 XYZ scheme. How can I prevent loading non-existent files out of my BBOX area? I have 8 zoom ...
2
votes
0answers
183 views

Layer preview using OpenLayers

I have been using geoserver from quite sometime now and publishing layers and consuming services. Recently I have started facing the issue mentioned below when I am trying to preview the layer in ...
0
votes
1answer
222 views

vector layer popup data from database

I have added vector layer(features) on the map. when i click on the feature , in the back end it has to take the latlon values and retrieve the data from database(using php) and display the values in ...
3
votes
1answer
663 views

Load a WFS layer from GeoServer into OpenLayers

I know there are already lots of questions about this problem, I have read all of them but there is also nothing in my OpenLayers map, there are also no errors in debugger, can some one help me find ...
3
votes
1answer
390 views

Problem with MGI CRS on the Balkan

I have problem with CRS Bosnia and Herzegovina? MGI 1901 / Balkans zone 6 EPSG:3908 MGI 31276 / Balkans zone 6 EPSG:31276 Which of these two is OK? When I open google sattelite image with ...
1
vote
0answers
358 views

using java to get ways from osm [closed]

I just try to figure out how to query all ways within a radius of let's say 1km from a defined point. Here is an example of what I mean: I've already read about overpass api, GeoTools and ...
0
votes
2answers
553 views

how to remove some fields with the WMSGetFeatureInfo function?

I am displaying the attribute data in the popup on clicking on the map using openlayers,geoext. But i want to hide some fields(fid,.....) from the table in the popup. How to do this. Below is my code ...
2
votes
0answers
62 views

Detecting click outside map control using OpenLayers 2?

My problem is the following: User loads form containing map control and then clicks the edit icon and starts editing a shape on the map. The shape is in edit mode as you can see the handles. ...
1
vote
0answers
62 views

Problem with the layers display KML stored in GeoServer

I have a problem with the layers display KML stored in GeoServer. Google Earth shows me the study area, but the layer doesn't appear. However, I can see the layer when I "click" in OpenLayers. Does ...
0
votes
1answer
347 views

Google Places search implementation

I have a Heron/Geoext/ExtJS map. I found a site with this function and I would like to implement it. So how can I use this function without their MapCentia.gc2 function? How can I rewrite it to use ...
2
votes
2answers
3k views

Change style of existing feature in OpenLayers2

I'm using OpenLayers 2 and have a number of LineStrings with custom attributes's drawn. I need to change the strokeColor on some of the lines styles programatically and have it stay this color even if ...
2
votes
1answer
117 views

How to Import Shapefiles (or any dataset) to a webmap using Openlayers/GeoExt online? WFS-T

I tried Using Heron, But it didn't workout well. The problem is, I couldn't found any good documentation about this matter. I just want to "Update" DataSet using an UpLoad tool to my actual Database. ...
1
vote
1answer
431 views

How to insert attributes into a WFS using OpenLayers?

So I have a web app that's running and is able to add points and lines to existing Postgis tables by getting data from Geoserver. I need the following one specific bit of functionality added: I want ...
1
vote
1answer
649 views

How to load 2 different WFS layers using OpenLayers?

I've been trying to load 2 WFS layers with the 3857 projection and I'm only able to load one of them, a line vector layer, while the other (point vector) doesn't load at all. Later I'm going to want ...
2
votes
2answers
359 views

Commiting Changes (WFS-T) Problem with Base Layer (Error Found: outside of (-180.0,180.0))

Committing changes stops working after changing the basemap from OSM (as a WMS) to Bing maps (or Google or even OSM as a "OpenLayers.Layer.OSM") PS: All my layers are on 3857 Here's the Error : ... ...
1
vote
2answers
331 views

Removed features on openlayers 3 is re-rendered on zoom in/out

In map I have Vector with Features inside, upon selecting some other options those features should be changed, therefore, I grab the map, select vector that I need, grab source from that map, and then ...
2
votes
0answers
980 views

How to implement search input (autocomplete) of Google Maps with OpenLayers

I'm trying to implement the autocomplete input search Google Maps in my application, but I use the basemap the GeoServer and OpenLayers, I do not instantiate Google Maps, and I can't... I use this in ...
1
vote
1answer
1k views

Editing WFS from GeoServer using OpenLayers

After reading a very good tutorial on how to edit WFS with OpenLayers, I've tried replicating it but with my own WFS layer from Geoserver. I managed to load the WFS and my basemap successfully and ...
0
votes
1answer
461 views

Create a turf polygon from extents to check intersection with other polygons

I am storing the bbox of layers as strings, as the following string : var layerExtent='[768039.2602094524, 5772524.37609651, 2313901.7202488566, 7435794.111581946]' and I'm using this method to ...
2
votes
4answers
6k views

Disabling map drag and zoom in OpenLayers 3?

I need to disable all map interactions, like map zoom, drag, scroll zoom, any kind of interaction. Is there some easy way to do it?
0
votes
1answer
678 views

Gettings multiple features at pixel

I got an app to do there is a map and lots of points which represent a pictures, for example i got 3 pictures in 1 coordinate, and other pictures has other identical coordinates. But now i need once i ...
1
vote
0answers
71 views

OpenLayers popup FramedCloud in mobile

How I can use the pop-up window in OpenLayers on mobile? I have implemented the FramedCloud popup on my website, but when I open my web browser on a mobile device, the popup window does not seem to ...
1
vote
0answers
89 views

Getting QGIS SLD From OpenStreetMap [closed]

QGIS has a plugin called OpenLayers. From that plugin, we can get a very pretty map. I have downloaded some shapefiles for the region (a city in my case) I am targeting. When I put the shapefiles on ...
0
votes
3answers
5k views

Split string of coordinates and put it in array

After doing the funtion: cirkelFeatures[1].getCoordinates().toString() I'am receiving the coordinates of the polygon (they are in epsg 31370) "140015.12392378994,147993.86462185346,146949.24235978903,...
0
votes
1answer
85 views

OpenLayers GeoJSON File

I am trying to add a GeoJSON file to my OpenLayers application and I am getting a cross origin request error. My main question is can a GeoJSON be stored locally (within a folder on my C drive) and ...
1
vote
0answers
77 views

Loading single feature from server - layer property is missing

I have a layer that consists of a few 100 features, of which only those are loaded that fit into a bounding box. Later, I want to check on the server side, whether a specific feature with a specific ...