Questions tagged [openlayers-3]

OpenLayers 3 is the complete rewrite of the OpenLayers 2.x mapping library, targeting modern features of HTML5 and CSS3. It is not compatible with OpenLayers 2. OpenLayers is completely free and open source, having been released under the 2-clause BSD License.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

How to read features as the mouse hovers it

as shown in the below posted code, in code in section main, i instantiate an object of type MapFeaturesReaders and then invoke .listen(). when .listen() is invoked, i create new VectorTileLayer. when ...
Amrmsmb's user avatar
  • 10.8k
-1 votes
0 answers
41 views

Openlayers 3 and multi-worlds visualization mode

For a legacy application I need to keep using openlayers-3. Now I need to have the possibility to keep visible an added overlay in a multi-worlds mode. For example, using this code example (https://...
Safari's user avatar
  • 11.6k
0 votes
1 answer
24 views

How to unregister .on(drawend,....) event

as shown in the below posted code, i have an event #drawEvt and it is registered for drawend. the problem i have is about unregistering the event. as shown below in the code in method deattachAll() is ...
Amr's user avatar
  • 37
0 votes
0 answers
22 views

How can specify the order of displaying shapes when work with open layer map

I created a map in which consist of different shapes such as 2 circle and one line. The line connects 2 circle Centre. Even if i have added line first and then the circles, the line always come over ...
Saimol Simon's user avatar
0 votes
0 answers
47 views

Microscope slide images load as multiple small tile images using open layer

I have larger sizes (more than 10GB) of microscope slides (ndpi, svs, tiff) images. To display that existing project member using the open layer 3 versions. While loading some images are converted ...
R.G.Krish's user avatar
  • 497
0 votes
0 answers
33 views

DrawHole custom geometry function not working

DrawHole has an undocumented option to use a custom geometry function which is not working : var geomFn = options.geometryFunction if (geomFn) { options.geometryFunction = function (c, g) { ...
Zeeshan's user avatar
0 votes
0 answers
31 views

Dynamically changing ImageStatic in OpenLayers

I have a map with one ImageLayer, with its source an ImageStatic. My page first loads the map with one image. Once a user presses a button, I want the ImageStatic to change to another predefined image ...
Saddy's user avatar
  • 1,525
2 votes
2 answers
135 views

how to deactivate zoom on double-click using setActive(false)

i would like to modify the below code in a such way that it only deactivate the zoom on double-click event please. i tried the below posted code, but it disabled all the interactions including the ...
Amrmsmb's user avatar
  • 10.8k
0 votes
0 answers
68 views

OpenLayers Workshop missing ol.js library

At the first step in workshop we try to create a basic map. Here is the code for a map.html <!doctype html> <html lang="en"> <head> <link rel="stylesheet"...
Mohamadou Laminou's user avatar
0 votes
1 answer
164 views

Problem when displaying lines and points (json) on OpenLayers Vue 3 js

I'm trying to display on an OpenLayers Map some points and lines using Vue js 3 but there is and "invalid type" issue that I could'nt solve. Here is the warning message on console log : ...
Hug's user avatar
  • 3
0 votes
0 answers
365 views

How we add 3D tile layers in ol-cesium map

I want to add 3D tile layers in this code but we are not able to how we can add 3D tile in this code. please explain me how we can add 3D tile layers in this code. I am beginner in ol-cesium so i don'...
Beginner's user avatar
0 votes
1 answer
282 views

How to View 3D building view angle in open layers

How we can see 3D building view angle in open layers like google earth 3D map. Click here for image Please see my image what i want in open layers map. I want to create 3D building view in open ...
user avatar
0 votes
1 answer
120 views

Is there an implementation of GeoTIFF in OpenLayer 3?

As the title says, I need to add some (COG) GeoTIFF layer to a website using openlayers 3. Since we're not ready to upgrade to a current version of openlayers, I've been wondering whether there was a ...
Pierpaolo's user avatar
  • 547
0 votes
2 answers
53 views

Why we pass 50 limitations in these file in open layers / GeoServer?

Please let us know what is use of below code and why we are passing the PARTIAL_BUFFER_STRATEGY_SIZE as 50 by default ? <context-param> <!-- see comments on the PARTIAL-BUFFER strategy --&...
Beginner's user avatar
0 votes
1 answer
450 views

Create 3D map in angular application using open layers and ol-cesium

I want to creating this project in angular but getting error when we import olcesium in .ts file after install npm ol-cesium. <html> <head> <link rel="stylesheet" href="...
Beginner's user avatar
0 votes
0 answers
284 views

create 3D building view in open layers

How to enable 3D building view in open layers map like google earth 3D view. see my image what I want click here to see image I search many but not getting any solution how to enable or create 3D ...
Beginner's user avatar
1 vote
1 answer
1k views

Adding marker on Openlayers Map using React

I want to add the marker on the Openlayer map using React on the center point but I am not able to do so, I tried different solutions but still no luck. Here is my React code: import React, { useState,...
malik.ahmed118's user avatar
0 votes
2 answers
335 views

How to add animated arrow as per the value I have entered in text box in open layers

I tried to add the animated arrow one by one on the string as per the value we are entering in the text box, but it was not possible. can give me solation how I add this. I want when we enter 4 in ...
Sanjay Singh's user avatar
0 votes
1 answer
169 views

How we can add multiple animated arrow icon on button click

We are trying to add multiple animated arrow icon on single line string on button click like as when we click start button then add one animated arrow icon on line string and when we click again start ...
TestCode's user avatar
0 votes
2 answers
278 views

How to add Multiple animated arrow icon on single line string in open layers

We are trying to add multiple arrow icon on single line string in this code but we are not able to add. so how we add multiple animated arrow icon on this code we also add image of your reference. ...
Sanjay Singh's user avatar
0 votes
0 answers
99 views

QGIS2WEB - OpenLayers - Improvement Popup by adding "highlight feature"

QGIS2WEB exports a map that allows to query by click multiple layers and multiple features at the same time, showing all the result in the outgoing popup as in this example where 6 different layers ...
andreaordonselli's user avatar
0 votes
1 answer
44 views

Openlayers 3 - add variable to ol.layer.Vector in a second time

in my project I define many var, including this one in example: var lyr_Confini = new ol.layer.Vector({ declutter: true, source: jsonSource_Confini, ...
andreaordonselli's user avatar
0 votes
0 answers
66 views

How to get features from cluster source for current extent?

How to get features from cluster source for current extent? I need to collect all features from cluster for current extent and zoom state. I tried this: this.mapService.map.getView().on('change:...
Hamed's user avatar
  • 23
1 vote
0 answers
52 views

Uncaught TypeError: format.writeGeometry is not a function at HTMLButtonElement

I would like to create a GML using openlayers to send to Geoserver to insert a new feature. While displaying writeGeometry() in console it displays the error like: Uncaught TypeError: format....
abin prajapati's user avatar
2 votes
0 answers
307 views

OpenLayers: How to hover over a raster (GeoTIFF) layer and return pixel value

How can I create a tooltip or mouse-over hover to return real data pixel values from a raster GeoTIFF source in Open Layers? Thanks.
bedr's user avatar
  • 21
-1 votes
1 answer
147 views

How to close Polygon during drawing OpenLayers?

I use Draw obejct to draw default polygon. It gives the following result: polygon drawing OpenLayers As you can see, the polygon is not closed. How to close it during drawing like it works after ...
Darmaev's user avatar
  • 15
-1 votes
1 answer
670 views

How to draw icon with image or text in center?

I have tried to draw icon in OpenLayers: style: (feature: FeatureLike) => { return new Style({ image: new Icon({ color: "red", ...
Aravina's user avatar
0 votes
0 answers
360 views

Openlayers Overlay autopan doesn't work when map width is not 100% [duplicate]

Openlayers version: v6. Overlay autopan is not able to move the map to display the entire pop-up window when the map container width is not 100% to the viewport(click at the right end of the map). In ...
Zac's user avatar
  • 620
-1 votes
1 answer
64 views

How to draw part of GeoJSON?

I load all geojson (countries) in VectorSource by url. It is displayed instantly on the map. But I need to display specific part of geojson. For example user selects USA country and the map have to ...
Stasia's user avatar
  • 7
0 votes
1 answer
101 views

Is there any way to access the locations for a vector layer in OpenLayers?

I created a vector layer called "locationGeoJSON" in OpenLayers using a GeoJSON file and I'm trying to use the .getSource() method to access the location data for the layer. I'm currently ...
allenz3's user avatar
1 vote
0 answers
206 views

Not able to draw arc between 2 points in Openlayer

I have 2 points on canvas. Lets say point-A [x=4.1549997, y=4.005] and Point-B [x=2.77, y=3.5749998] Now, I want to draw an arc arrow from Point-A > Point-B AND Point-B > Point-A using ...
Abinash Dash's user avatar
0 votes
1 answer
612 views

OpenLayers 3 postcompose to OpenLayers 6 event in Vue SPA

I have made this codepen where I manipulate the context of the basemap of a OpenLayers map on postcompose. The problem I have is translating this working demo to a Vue SPA which uses OpenLayers 6 ...
Curious's user avatar
  • 393
0 votes
1 answer
720 views

How to render Array of coordinates for line map using OpenLayers?

I have a endpoint /geomap_data/ that I am using to return customer_sites in the console log in browser which shows the following which is Sites Coordinates, Customer coordinates: 0: "[53....
RedRum's user avatar
  • 942
-1 votes
2 answers
1k views

How To Draw Path Between Two Location Coordinates Using OSRM Routing Machine in OpenLayers?

How To Draw Path Between Two Location Coordinates Using OSRM Routing Machine in OpenLayers ?
Prashant Shravan Ujjainkar's user avatar
1 vote
1 answer
263 views

WFS point layer label is not displaying on OpenLayers 3

I have loaded the WFS point layer data from GeoServer successfully. And I can plot the point layer also, but the label was not displaying. I added label as text param on Style part and the param looks ...
Ashwath B K's user avatar
0 votes
0 answers
649 views

map.getView().fit() and image problems in openlayers

I want to make an "Add Area" function. After clicking on the map the popup for entering the Area name will be showing and after confirming the name, the map should be automatically zooming ...
Kusanagi's user avatar
1 vote
2 answers
2k views

How to Change position of default zoom tool of Open Layers using css?

How to Change position of default zoom tool of Open Layers using css? enter image description here
Prashant Shravan Ujjainkar's user avatar
1 vote
0 answers
329 views

How to Draw Multi Line string With GeoJSON Object Openlayers

I am trying to draw linestring by holding the GeoJSON object. But when drawing process starts, the pointer can be selected everywhere on the map. My purpose is the pointer just be selected on the ...
Kaleraa's user avatar
  • 53
0 votes
2 answers
763 views

how can i zoom to specific geometry in openlayers , selected from drop down

<!DOCTYPE html> <html> <head> <title>Advanced View Positioning</title> <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@...
Prashant Shravan Ujjainkar's user avatar
-1 votes
1 answer
557 views

Open Layers VectorTile and Google Maps Zoom Issue

I am using the OL react package with Olgm("OLGoogleMaps"). The issue I am experience is that the Google Maps layer is animating when zooming, but the Vector Tile layer does not. The result ...
helomelo's user avatar
0 votes
1 answer
459 views

how to show a pop-up/overlay window

i am trying to show an overlay containing the position of where the mouse is clicked. i referred to the example in openlayers official webpage here but when i run the code, the console.log message is ...
Amrmsmb's user avatar
  • 10.8k
0 votes
0 answers
468 views

How to pass parameter to style function

in the below posted code, i want to pass the parameter keyGridsAsGeoJSON as input to the function in style attribute.every time i print the value of k which is var k = keyGridsAsGeoJSON i receive the ...
Amrmsmb's user avatar
  • 10.8k
0 votes
0 answers
70 views

How to add features to VectorLayerSource

as shown in code2, i have keygridsAsGeoJSON which contains coordinates of some features as geojson.in code1 i am using VectorTileLayer and VectorTileSource. the problem i have now is, i would like to ...
Amrmsmb's user avatar
  • 10.8k
0 votes
1 answer
35 views

New geometry from area

I'm using OpenLayers 3 and I'm trying to create a geometry. I have a starting point (X,Y) and I need the geometry to be a rectangle of area = 10.000 How can I achieve the above?
Luka's user avatar
  • 67
0 votes
1 answer
276 views

what is the difference between imageExtent and bounding box?

I am asking about the definition of imageExtent and bounding box in openlayers ?. I saw these words in other type of mapping library like leaflet. I did not found a real definition.
karlos's user avatar
  • 837
0 votes
0 answers
509 views

Modified WFS feature was not saved in Database

I managed to load the WFS and my basemap successfully and managed to get the buttons to show up. The buttons appear correctly like in the working example, for some reason the geometry data isn't being ...
Ashwath B K's user avatar
0 votes
1 answer
265 views

OpenLayers Timeline implement history marker player with time

I am trying to implement OpenLayers TimeLine with openlayers-timeline There are no working samples since GEOJSON files are missing Missing GEOJSON. I have marker history as below; Name: "marker1&...
Supun Silva's user avatar
0 votes
1 answer
592 views

【openlayer】add a feature to layer,but can not get the feature by click event,how to resolve the problem

Question openlayers version: 6.4.3 Add a feature which is created by a SVG string to map,then click the the feature on the map, but can not get the feature from the callback function. However, i make ...
lewis's user avatar
  • 1
0 votes
1 answer
482 views

How to set limit to radius of drawing circle in openlayers?

I want to set max radius option to ol.interaction.draw (type of Circle). But i couldn't find any option that offically added. I can handle "drawend" event and cancel it manually if radius ...
user3565914's user avatar
0 votes
1 answer
1k views

How to access methods of openlayers map in vue3

I use vue3-openlyers to create a map like the following: <ol-map ref="map"> ... </ol-map> In Vue's composition api, I try to access the getSize() method of the map: import { ref,...
Philip F.'s user avatar
  • 1,197

1
2 3 4 5
49