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

learn more… | top users | synonyms

1
vote
1answer
12 views

Get Center of Geometry in OpenLayers 3

Given a Geometry object in OpenLayers 3. How would one go about getting its center? Older versions of OpenLayers provided a getCentroid method. There was also a getBounds workaround. But these appear ...
1
vote
0answers
8 views

OpenLayers map with Nominatim lookup function not working

I am trying to create a simple map with a search function, my minimal example is here: http://jsfiddle.net/TimLucas/vbaupe30/4/ For some reason the coords transformation after the script has received ...
2
votes
1answer
34 views

Why my Shapefile is not loaded into OpenLayers?

This is my website for test: http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html I want to put my Shapefile in OpenLayers. I found an example at ...
0
votes
1answer
14 views

Problems with a wms layer in Openlayers 3

First of all sorry if my english isn't good. I'm trying to add a layer into an Openlayers 3 map. This one is which I want to insert: new ol.layer.Image({ name: 'cartografia', style: 'cartografia', ...
1
vote
0answers
29 views

Relationship betwen scale, ppI, and map resolution

Wanting to know the screen resolution (Pixels per inch)of my device, I displayed my map resolution and scale using this openlayers code: console.log("resolution: " + map.getResolution()); ...
0
votes
1answer
22 views

How to hide country and city label?

Now I'm using Openlayers to integrate Openstreetmap into my web. Besides, I want to hide/remove all the labels on map(country,city,road,lake....). How can I do that without establishing my own ...
1
vote
0answers
10 views

How to rotate a feature in openalyers 3

I cannot find any api to rotate a feature / geometry in openlayers 3. How do I rotate a polygon in openlayers 3?
0
votes
2answers
18 views

Openlayers Marker z-index

I have multiple marker in one layer OpenLayers.Layer.Marker and some times the marker overlap the other marker. My question is how do I bring the marker in front when its click? is there a setZ-index ...
0
votes
0answers
27 views

Can I use Google's Geocoding with OpenLayers provided the base map is Google Streets?

Not strictly a GIS question but I am hoping someone might have some experience in this area... Understanding the 10.1.1a clause in the Google Maps/Google Earth APIs Terms of Service: (a) No ...
-1
votes
0answers
9 views

OpenLayer select feature from geojson [duplicate]

His guys.I use openlayers(version 2.14) How to get select feauture from geojosn? http://jsfiddle.net/xv6feg0n/3/
0
votes
1answer
8 views

Strange behavior when zooming with “Tiled:True” in a WMS layer

I activate the TILED parameter to True in a WMS Layer and I get the following strange behavior as shown in the images: This happens only for a couple zoom levels. If I zoom out/in more the features ...
1
vote
1answer
11 views

'setExtent' on vector layer not working?

As pre my requirement I want to set layer extent after drawing all the features. May some feature not visible after applying setExtent() function(this is my requirement). But it's not working. It's ...
1
vote
1answer
46 views

Openlayers: select a feature programmatically from GeoJson

I am working on a project that uses openlayers (version2.14)to display a Bing layer(GeoJSON format), I have no problem reading the GeoJSON and display features, but I want to select a feature ...
2
votes
2answers
32 views

Print view or export to PDF

I am using OpenLayers Tile layer fot my map application. I have WMS layers on map like this: Parcels, Streets, Buildings, Gas Pipes, I zoom to somewhere on map that all layers are visible. I want ...
0
votes
1answer
32 views

OpenLayers 3: Query individual features of Tile WMS

I have several tile wms layer with about 5000 earthquakes and I want to query their features by clicking (as in this example: http://openlayers.org/en/v3.1.1/examples/getfeatureinfo-tile.html). That ...
0
votes
1answer
16 views

Photogallery for OpenLayers

me and my collegue are making a web map application for my town for tourism purpose. The map itself is pretty done, actually, so we were wondering whether add some photos of the town, or that shows ...
1
vote
2answers
16 views

Including js file in openlayer.js file

I have this code for showing markers on map: function addUserLayerCSV(){ layer1 = new OpenLayers.Layer.Vector("CSV", { projection: epsg6316, strategies: [new ...
0
votes
1answer
12 views

unit of point radius in OpenLayers.js

What is the unit of measurement for pointRadius in the code bellow? var dotStyle = new OpenLayers.StyleMap({ pointRadius: 5, }); I mean what does 5 represent? 5pixels or 5mm? or ...
3
votes
3answers
42 views

Ways to deal with thousands of features of vector layer in OpenLayers

I am building a webgis portal too show a big number of polylines (road network) and points (villages, cities etc.). All my data are stored in a POSTGIS and throuh geoserver and Openlayers I display ...
-1
votes
0answers
19 views

Openlayers or Mapserver Errors?

What does this error mean? Uncaught TypeError: Cannot read property 'get' of undefinedext-all.js:9 Ext.Container.Ext.extend.getComponentLegendPanel.js:128 ...
1
vote
1answer
32 views

GetLegendGraphic request string is too long

I am setting the SLD Body of a WMS layer on the client side. I set the style in JSON and I have some functions that convert the JSON to SLD (OpenLayers functions). It works fine for displaying the ...
4
votes
3answers
103 views

Alternative to OpenLayers plugin for QGIS?

Are there any alternatives to OpenLayers plugin to have Google / Bing maps for QGIS projects? I need an high quality cartography (both aerial and street view) but OpenLayer plugin do not allow to ...
1
vote
2answers
30 views

Showing csv file on map

Does OpenLayers support the uploading and rendering of CSV files? If it does, how? I used this code and it didn't help. var curLayer = new OpenLayers.Layer.Vector("layer", { protocol: new ...
1
vote
1answer
28 views

OpenLayers popup not closing on mobile device

I am developing an app that should also work on mobile devices. I would like to close all open popups when clicking on the map (in this case only one can be open at any point, as opening a new one ...
0
votes
2answers
26 views

OL3 check if point is inside a polygon

When I am adding a point to my web map I want to give it a latter that represent the area where the point is, so I need to know in what area is the point. In OpenLayers 2 I did it like this: ...
1
vote
1answer
32 views

How to get coordinates by click on map and send coordinate to MySQL?

I'm building my own web map. Now I want to get the coordinates by click on the map and send the coordinates to MySQL. I tried OpenLayers to get the coordinates from Openstreetmap,but I didn't know ...
2
votes
1answer
27 views

OpenLayers + MapServer - Finding reason for random missing tile

I am testing an application this is developed in OpenLayers 2.13 with Chrome, and I am using MapServer as the map provider. I have noticed some tiles occasionally does not render, when I pan/zoom ...
1
vote
0answers
12 views

Disconnected Satellite map tiles usable with OpenLayers or other javascript api

I'm looking for satellite map, usable with OpenLayer (or with an other js api), with a good scale (at least 100m, MapQuest stops at 1000m) and avaible for a disconnected mode (avaible for download). ...
2
votes
1answer
20 views

Updating Street Features in QGIS from Google Maps

I am a GIS student. updating infrastructure layers in QGIS for a small municipality. Everything is open source and there is no budget for buying new data. I need to update the ROADS layer - as the one ...
0
votes
0answers
16 views

Openlayers marker is not appearing from onclick event

I am trying to call a createMarkers function from an onclick event and all I get is a glimpse of a broken image tag. Here is my createMarkers function: function createMarkers(){ var lonlat = new ...
0
votes
1answer
28 views

Adding Google Maps layer in OpenLayers?

Please tell me why we use: max Extent: new Open Layers.Bounds( -20037508.34, -20037508.34, 20037508.34, 20037508.34) when adding Google Maps layer in OpenLayers? i.e. please tell me about ...
0
votes
1answer
32 views

How to get OpenLayers map object in HTML form?

There is a form to within a web page, map of OpenLayers is displayed in the form. I look at the source code of Html, and further a hierarchical state in the form. My goal is to get the Polygon at the ...
1
vote
0answers
12 views

OpenLayers 2.12 Cluster strategy labels are undefined

I am using a cluster and filter strategy for my map data. All the labels appear as "undefined." Here is my comparison filter: all_year_filter = new OpenLayers.Filter.Comparison({ Type: ‘~’, ...
1
vote
1answer
18 views

How do I get Open Layers to set the default view in EPSG:27700

Disclaimer, I'm fairly new to Open Layers, but I'm not new to JavaScript and/or Web Programming :-) Sysnopsis I have an open layers based html page, that I'm trying to use to render a WMS map served ...
0
votes
2answers
44 views

Programatically export Openlayers maps to static image file

As far as I understand this example from the OpenLayers page and the linked source code for this example, OpenLayers3 now has the offical ability to save maps as static image files. However, the ...
0
votes
2answers
35 views

OpenLayers: png as external graphic marker

I would like to style my point features. For some markers I use the convenient OpenLayers.StyleMap options, for few of them I would like to use an external png graphic (the camouflage circle). I use a ...
1
vote
2answers
15 views

how can we save vector layer as a file in openlayers

Im using mapserver + openlayer for GIS API and im new to GIS. I'm done with drawing line, point and polygon features in openlayer. but not being able to save it in some shapefile afterwards i got to ...
5
votes
1answer
85 views

How to resize a feature and prevent it from scaling when zooming in OpenLayers 3

I have initialized a custom OpenLayers 3 map (used to show houses for sale in the neighborhood) with an image as the map. Then, I create additionnal features and layers dynamically for each house ...
1
vote
2answers
26 views

How to get an existing feature's rotation angle in OpenLayers 3

I created two external controls for my OpenLayers 3 map: Rotate Left and Rotate Right. I already stored the last dragged/clicked feature in a global variable, yet I'm struggling to retrieve the actual ...
0
votes
1answer
48 views

Setting properties of geoJSON in OpenLayers

I have a map with layers that have similar attributes. I want to add a function that when you select a feature in a layer, it searches for a feature with similar properties in another feature (in this ...
2
votes
0answers
29 views

Excluding layers from GeoExt 2 Legend Panel

I'm trying to exclude some legend in GeoExt.panel.Legend. I've created a vector layer named 'City Extent' via a function but I want the legend to be removed in the list of legends in my legend panel. ...
0
votes
2answers
27 views

Open Layers Label styling (font size)

I have a polygon dataset that I am symbolizing in OpenLayers using a context to determine the correct color, and also a label for each polygon that I want to alter depending on the zoom level. But ...
0
votes
0answers
35 views

Offset problem with GeoTIFF and Google Maps

I have several GeoTIFFs generated with GDAL, and just some of them present a weird offset shift of a range of ~5 km in average. The range of these problematic rasters is as much as -85/-70/-20/0. ...
0
votes
1answer
16 views

OpenLayers FrameCloud does not find JavaScript functions

I am trying to use a function inside the FrameCloud function: if (selectedFeatures.length > 0) { popup = new OpenLayers.Popup.FramedCloud( ...
0
votes
0answers
12 views

Custom tile area in OpenLayers for every zoom level with a custom tile resolution

For an extend min_x, min_y, max_x, max_y in EPSG:3857 somewhere on the map (eg. france) I have an image cut into n x m tiles and requestable under an URL: http://localhost/map/{x}/{y}.jpeg How do I ...
1
vote
1answer
23 views

Connect OpenLayers3 Client with QGIS Server

at the moment I am developing a map editor on a web. After researching at the internet about map clients, I decided to use OpenLayers3 client because it is very simple an has all the tools i need ...
1
vote
1answer
28 views

How to convert distance in meters(EPSG:28406) to EPSG:900913 with OpenLayers?

For point I use OpenLayers and transform(): numZona = Math.ceil(parseFloat(lon)/6)); Proj4js.defs["EPSG:28406"] = '+proj=tmerc +lat_0=0 +lon_0='(parseInt(numZona)*6-3)+' +k=1.000000 ...
1
vote
2answers
32 views

Openlayers Animated marker

How to animated feature marker in openlayers like in google map example of bouncing marker. I'm new in openlayers so if you have a sample code much better.
1
vote
1answer
23 views

WFS vector layer not rendering with OpenLayers

Can anyone help please? I'm having problems trying to load a Geoserver/WFS vector layer using OpenLayers. I can see GML data loading in Firebug and also I can see the layer name is in the layer ...
0
votes
0answers
15 views

I'm experiencing problems getting the 'Map Menu' button to work

I've been designing a geoexplorer-like application using Opengeosuite's SDK.My big problem is incorporating the wizard in a window.From the code below,you can see the window's created, it does pop up ...