Questions tagged [openlayers-2]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
191 views

Replacing protocol in geoext.form.formpanel‏

I've been scratching my head over this and I'm wondering if this is possible. I want to replace the protocol of the GeoExt.form.FormPanel in the following way: to render the formpanel, I defined a ...
0
votes
1answer
205 views

Overwriting URL of OpenLayers.Protocol.HTTP

How can I overwrite the url of OpenLayers.Protocol.HTTP? I tried searchformPanel.protocol.url and it works (checked with console.log), but at the end the original url is sent (in the code below: url:...
1
vote
1answer
406 views

GeoDjango raster field display on Leaflet

In the new Django version support raster field and I follow this manual for GeoDjango raster field and this question for add raster I have built a simple demo. Here the code : settings.py postgis ...
2
votes
1answer
199 views

Map markers for OpenLayer map Tiled layers

I need to put some map markers on an OpenLayer map. The map is populated from Geoserver. I have more layers, this is one of it: case "cite:geo_poli_intabulareNouFiltered": var userId = $("...
2
votes
1answer
30 views

OpenLayers problem with adding features to custom drawings

I would like to export the features drawn on my OpenLayers map in GeoJSON format. So far everything is working apart from the properties section, which keeps coming with nothing, as you see below. I ...
19
votes
6answers
20k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
0
votes
1answer
101 views

Viewing Google Satellite on my web map

Please help me add "Google Satellite" to my web map by following the code below: Ext.onReady(function() { Ext.QuickTips.init(); var bounds = new OpenLayers.Bounds( ...
2
votes
1answer
177 views

Drawing new features with QGIS2web plugin

I would like to draw shapes with QGIS2web plugin According to the query here: Add OpenLayers3 controls to qgis2web project I should be able to develop the qgis2web.js file further behind the ol.Map ...
1
vote
4answers
5k views

How can I use measure tool with Openlayers 3?

I didn't see any mention for measure tool in OL 3 API. Is there an alternative / a way to use a measure tool (line & area) with OL 3 ?
0
votes
1answer
255 views

Style OpenLayers.Feature.Vector in OpenLayers.Strategy.Cluster()

I'm using the clustering feature in my project. I collect list of points like so: cluster_features.push(new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lon,lat), {heading:deg} )...
0
votes
1answer
41 views

Clicking on newly created Vector layer in unit testing (Jasmine)

I've created a component that attaches a new vector layer on the click of a polygon. I've used custom interactions of openlayers to do so (using ol/pointer). I need to click on a particular coordinate ...
0
votes
1answer
131 views

Requesting two layers in search action of one PanelForm

I have a panelForm with 4 fields, and a search button, that search for the features that correspond to the 4 fields given by the user. and I have two layers that both contains the 4 fields. after the ...
5
votes
1answer
1k views

OpenLayers creating Marker Vector Layer

I have seen over the internet a lot of examples of using Features paste them into the Vector layer and after that insert the layer to the map . basic example: <script> var iconFeature = ...
1
vote
3answers
2k views

GeoServer, OpenLayers and updatable views: unable to edit data of WFS-T feature layer

I am developing an web application, where the user is able to view and update some feature attribute of a WFS layer. My problem: the edited data is not saved at all. Here's the situation: GeoServer ...
1
vote
1answer
81 views

Creation of buffer area of 20mtrs upon click event on the base layer

I have a base layer upon which i wish to import a kml with certain lat lons and create a buffer region of 20mtrs around any point upon click event. i got google api for the same but want openlayers ...
0
votes
1answer
163 views

OpenLayers.Filter.Comparison value charecter encoding

I am using vector layer with WFS protocol var adressVector = new OpenLayers.Layer.Vector("Adress", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ ...
1
vote
1answer
223 views

OpenLayers feature styling change by the baselayer

How can I have the style of the features on a vector layer depending on the OpenLayers' "base layer"? For example, some base layers are dark images and I need (for the contrast) the features to be ...
1
vote
2answers
3k views

Linebreak in style.Text in Openlayers 3

I have a vector layer from json, and have a style symbolizer: new ol.style.Text({ text: ol.expr.parse('name') }) In an vector layer, some of the nodes contains more than one name. I try to find a ...
1
vote
1answer
303 views

How to get the last drawn point for a Geometry in OpenLayers

I wonder if I can get the position of the last point for a geometry in OpenLayers? For example, I have an OpenLayers.Geometry.LineString, how to get its last point? Clarification in the comments: In ...
1
vote
1answer
243 views

How to rotate a feature in OpenLayers3

I cannot find an API to rotate a feature/geometry in OpenLayers3. How do I rotate a polygon in OpenaLayers3?
0
votes
1answer
287 views

Loading a GPX file using OpenLayers 2

I am trying to read a gpx file and add it as a layer to Open Layers. Here is my code snippet osMap = new OpenLayers.Map({ div: "map", maxExtent: extent, resolutions: ...
1
vote
1answer
9k views

Adding markers using OpenLayers 4

adding markers works fine using OpenLayers 2 but now I need to add markers using OpenLayers 4, how can I do this? my code as follows: var markers = <?php echo json_encode($data)?>; var ...
9
votes
4answers
3k views

Implementing WPS client in OpenLayers 3?

Is it possible (and what is the recommended way) to use OpenLayers 3 to do the work of theOpenLayers.WPSClient? As shown in the old WPS client example, OpenLayers 2 can be used to operate WPS. ...
2
votes
1answer
3k views

OpenLayers & Google Maps: TERRAIN not showing as baseMap

I have a problem with OpenLayers and Google maps: on this page: http://***/public/ I'm loading Google maps TERRAIN with Openlayers.js, everything worked well for about 1 year, but now the terrain map ...
3
votes
2answers
776 views

GeoJSON data not displaying on Openlayers map in GeoDjango

I have the following code. models.py class PFT(models.Model): species=models.CharField(max_length=50) geom = models.PointField(srid=4326) objects=models.GeoManager() def __str__(...
3
votes
2answers
3k views

How to query which features of all vector layers intersect with a given bounds?

I am writing a Openlayers map app, and wondering whether there's a better practice to query which features of which vector layers intersect with a given bounds.. It's certainly not a good idea to ...
6
votes
2answers
1k views

Editing PostGIS topology in web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
10
votes
3answers
2k views

How to preserve topology while editing polygons in OpenLayers?

I’m facing this issue: I have a chloropleth map based on a set of polygons with some data. Using WFS-T (postgis, geoserver, openlayers) I am able to edit the geometry of the polygons. This works fine. ...
0
votes
2answers
335 views

OpenLayers - order of layering from a KML file

I have a set of KML files hosted on a webserver, which two applications use; one uses OpenLayers and one uses Google Maps. The problem is the order they render the KML. Google Maps (and Google Earth) ...
1
vote
1answer
383 views

Getting two lat-lon points in JSP to find shortest path on click of OpenLayers map?

I'm using GeoServer, PostgreSQL and here OpenLayers. I'm trying to retrieve two lat-lon points (for point A and point B) on clicking of map. This code is working only to retrieve one lat-lon. I ...
1
vote
1answer
365 views

Parse a KML for OpenLayers

I am trying to get a KML from a URL to display in OpenLayers. However, it is a ground overlay so it cannot be displayed the standard way. I found this thread: [https://gis.stackexchange.com/questions/...
5
votes
1answer
58 views

Testing a GeoServer "Scrolling" performance

I'm looking for a way to test the responsiveness of various layers when scrolling around the map. So after a layer is loaded and the user is moving around the map looking a specific area or whatever. ...
3
votes
3answers
2k views

OpenLayers is very slow when using WKT multipolygon with large number of points

I'm showing the boundaries of Cyprus regions using OpenLayers with vector layer, I get the coordinates from a shapefile which has a lot of points, for instance some regions can have a multipolygon ...
0
votes
0answers
33 views

Why are points from a MySQL WMS layer, displayed on a OpenLayers 2 map, reading out a lat/long location that is off by 500 meters,

I have a MySQL table containing MySQL point geometries (MySQL 5.7). I have configured a GeoServer WMS layer using this data. I cannot set the native srs (not enabled in config dialog), declared srs is ...
1
vote
1answer
481 views

Filtering points in 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 ...
2
votes
2answers
3k views

Srver-side (WMS) rendering / caching of vector data

I have to develop a webapp that will have to display a large number of polygons on a webpage, with complex filtering options. The source data never changes (I will simply reload a new version of the ...
3
votes
2answers
10k views

Disabling Google Maps zooming animation effect

I am using OpenLayers mapping library in my application. I have integrated Google map V3 & added other several WMS overlays, Vector layers etc. Every thing working fine. But I am facing big ...
4
votes
1answer
2k views

Is there a way to get centroid of geographic object in MSSQL?

I have a table of OSM geographic roads in MSSQL 2012. I want to create a new column with the centroid of each road (So I can set center on OpenLayers map for each road). How can I do it ?
6
votes
3answers
698 views

GIN/GiST Full Text searches through openlayers, geoserver and postgres

I have a a web app that automatically maps recent tweets and allows you to search for certain keywords. it uses Postgres for the database, geoserver as the server, and openlayers as the cartographic ...
2
votes
1answer
1k views

Allow viewer to embed OpenLayers in their own site?

I am trying to create a way for someone viewing my site to embed the map they are viewing into their own site. Not sure where to begin on this. Any help?
0
votes
0answers
53 views

vue.js base wont load in while loading OpenLayers map

While using OpenLayers library in vue.js the map won't load. It isn't showing any error but only zoom in, zoom out and OSM atrribution is showing. <template> <div ref="map-root"&...
2
votes
2answers
423 views

CQL filter causing slowness in Java \ Geoserver app

I have a Java application that includes an OpenLayers map with WMS tiles pulled from Geoserver. Geoserver and the Java app are looking at the same MySQL database. In the Java application I have a ...
6
votes
3answers
6k views

how to open geotiff as base layer on openlayers

i want to add a geotiff image as base layer on openlayers : copy my image.tiff in a directory and open it with openlayers directly without using a cartography server.
3
votes
3answers
1k views

Does the a wms layer in openlayers have "maxfeatures" option?

Does the a wms layer in openlayers have "maxfeatures" option? I'm asking this because my wms layer contains allot of points ( > 100.000). When zoomed in I don't want the rest of the features (not ...
1
vote
1answer
438 views

OpenLayers select.on event listener fires multiple times (renders multiple)

I am using hook React. How to render event only once instead multiple times useless? When I am selecting a feature, it renders multiple times var select = new ol.interaction.Select(); const translate =...
-1
votes
1answer
111 views

Limiting Google street view to extent on OpenLayers 2?

I would like to be able to limit the Google street view area in my map to to 500m radius from where the panoramic street view starts ( this is where the user clicked the mouse on the map). Is this ...
0
votes
0answers
31 views

OpenLayers fit to extent doesn't work

I have the following example: <script src="http://www.openlayers.org/api/OpenLayers.js"></script> <div id="mapdiv"></div> <script> map = new ...
19
votes
3answers
55k views

Change OpenLayers 3 view center

I'm using OpenLayers 3 to interact with some maps. I first declare my map: map = new ol.Map({ target: 'map', layers: [ new ol.layer.Tile({ ...
0
votes
1answer
629 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({...
14
votes
4answers
30k 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
2 3 4 5
66