113 questions
0
votes
0
answers
113
views
Openlayers how to dynamically filter layer data with one or more filter values through style variable
I am using latest openlayers version.
I have created layer using WebGLPointsLayer with flatstyle.
I want to build functionality to where user can apply filter to filter data on map.
Below are the ...
0
votes
1
answer
262
views
Snapping support for moving polygons in OpenLayers
OpenLayers has an example on how to implement snapping support for points on a map. Though I'm investigating whether snapping is also supported for moving and snapping polygons as a whole, instead of ...
-1
votes
1
answer
82
views
Openlayer On zooming map image, filter & get only visible areas on Map
Using openlayer library, I want to show a list of areas which are visible on image map post zooming the map. For example, On load of image map using Openlayer library, 100 tagged areas are shown, post ...
0
votes
0
answers
152
views
Openlayers: Rendering stuck - Unable to print PDF with higher resolution
I am trying to use the openlayers example to print the PDF & it is working for lower resolution prints.
I am trying to fit the map to a certain polygon extent:
` map.setSize(printSize);
...
0
votes
1
answer
64
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 ...
0
votes
0
answers
220
views
Openlayers : unable to print / export pdf's with google maps while osm works
I am able to print the pdf while refering to the openlayers export to pdf example, https://openlayers.org/en/latest/examples/export-pdf.html, when open street map is set as background is working fine ...
0
votes
0
answers
200
views
How can I fit a rectangular image to a polygon Openlayers v7?
I need to fit the image to the geometry of the feature. this is my code (
I'm using Angular 14 and openlayers 7):
this.map.on('click', (e) => {
const feature = map.forEachFeatureAtPixel(e....
0
votes
0
answers
72
views
Unable to get the Correct URL from the getFeatureInfoUrl method in OpenLayers 7 using Angular
I want to get the Information of the Layer and display it to the user. Here I used getFeatureInfoUrl method of OpenLayers 7 to get the URL but I am getting the BBOX,I and J values as NaN I have to get ...
0
votes
0
answers
122
views
map.foreachfeatureatpixel() not working in angular typescript open layers 7
The code working in normal JavaScript finely but in Typescript (Angular) it was throwing an error that this.map.forEachFeatureAtPixel(), this.map is undefined and cannot read properties of undefined.
...
0
votes
0
answers
77
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 ...
2
votes
2
answers
566
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 ...
-1
votes
1
answer
163
views
Remove event context canvas render when finished [closed]
I'm using OpenLayers to compare two Vector Layers.
One Layer is the main layer and gets loaded with the map the other layer get's loaded
after when I want to compare the 2 layers.
(Desired behavior) ...
0
votes
0
answers
214
views
How can I use OpenLayers Swipe with VectorLayer
Currently I'm tasked with comparing Vector objects as they've changed over time based on the year a user selects.
I've been using Open Layers Swipe as a guide
https://openlayers.org/en/latest/examples/...
0
votes
1
answer
169
views
flip OpenLayers WebGL swipe functionality
I'm currently using this example in my application
https://openlayers.org/en/latest/examples/webgl-layer-swipe.html
which overlays the left side of the map with a lay that you can extend over your ...
0
votes
1
answer
118
views
How do I style a range control to include a vertical line
I'm working with Openlayers and I've implemented the layer swipe control.
https://openlayers.org/en/latest/examples/webgl-layer-swipe.html
I would like to have this same functionality with a line ...
0
votes
1
answer
234
views
Properties don't exist for OpenLayers event.context
I'm trying to follow an example from OpenLayers.
https://openlayers.org/en/latest/examples/layer-swipe.html
I've imported what I need and I'm working on implementing the example in my code but I'm ...
0
votes
1
answer
187
views
Convert Maps to PDF and open PDF Viewer
I am trying to convert the map with some header text. The header keeps overlapping on the map instead of being above header and displaying the map below. I want to add a log and header besides it and ...
0
votes
1
answer
313
views
How to scale background pattern with the map when zooming in open layers?
I'm drawing a rectangular feature onto a map layer. I have some image pattern I want to display as a background of the feature and I want the pattern to scale with the map when zooming, meaning the ...
0
votes
1
answer
117
views
How to get to original coordinates from a KML file after creating a vector source from it
I was creating a Vector source from a KML file which I read in.
The file had the following LineString in it:
<LineString> <coordinates>-106....
3
votes
2
answers
466
views
OpenLayers error TS2416: Property 'on' in type 'Geolocation' is not assignable to the same property in base type 'BaseObject'
I am trying to show Map with OpenLayers library in my Angular project.
The app started breaking with following error after I added Map object in my code.
node_modules/ol/Geolocation.d.ts:103:5 - error ...
0
votes
2
answers
576
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 ...
0
votes
1
answer
259
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 ...
0
votes
2
answers
470
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.
...
0
votes
0
answers
80
views
How to create animation on the linestring with arrow sign?
I'm able draw the linestring on the map based on the data but I want to draw the animated linestring as shown in attached image. Could anyone help me out for this from #openlayers community?
Inside ...
0
votes
0
answers
235
views
Unable to add event listener for MouseWheelZoom event in Openlayer map
I am trying to implement a functionality using openlayers with Angular in which I have to add one interaction using MouseWheelZoom.
Interaction gets added but control does not come inside the event ...
-1
votes
1
answer
234
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 ...
-2
votes
1
answer
130
views
How to draw the multyline in OpenLayers?
I have learned a Draw object in Openlayers.
I try to draw the dotted line when user moves the mouse. When user clicks the last and prev lines should be replaced on straight line.
How does it work, ...
0
votes
1
answer
749
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 ...
0
votes
1
answer
90
views
How to make a variable visible within the scope of a function
as shown below in the code, i am declaring the variable AoC and i want to assign to it the value feature.get(environment.KEY_OF_MVT_FEATURE_1). the problem i am facing, is that the variable AoC is not ...
1
vote
2
answers
422
views
How to add properties to a rendered feature of TileVectorLayer
as shown in the below posted code, i create a VectorTileLayer and the VectorTileSource is MVT geometry that is retrieved from a webservice as stated in the url attribute.
the database table contains ...
0
votes
0
answers
653
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 ...
0
votes
0
answers
77
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 ...
0
votes
0
answers
137
views
is there possible for uploaded rotated image and rendered with some wrong resolution or extents using static image source in open layer 6
I am using open layers 6 lib for map rendering and events.
my application needed same like this example http://viglino.github.io/ol-ext/examples/layer/map.geoimage.html i.e. Example have ol.source....
0
votes
0
answers
419
views
is there possible for set rotation and scale to raster static image source in open layer 6
I am using open layers 6 lib for map rendering and events.
my application needed same like this example http://viglino.github.io/ol-ext/examples/layer/map.geoimage.html i.e. Example have ol.source....
0
votes
1
answer
349
views
Catch the end of drawing in OL6
I have this code which is complaining after upgrading to OL6.6.1
draw.on('drawend', (e: olDrawEvent) => {
const format: olGeoJson = new olGeoJson();
this.shapeString = format.writeGeometry(e....
0
votes
1
answer
487
views
OpenLayers how do I stop propagation of pointer in OpenLayers 6
I'm upgrading to OpenLayers 6 and the code that previously worked
import { MapBrowserPointerEvent as olMapBrowserPointerEvent } from 'ol/events/Event';
const simpleLineInteraction: ...
1
vote
1
answer
5k
views
How do I fix Typescript errors in OpenLayers 6.6.1
After upgrading to OpenLayers 6.6.1 I am receiving hundreds of typescript errors caused by generics.
For instance...
import olLayerVector from 'ol/layer/Vector';
import olFeature from 'ol/Feature';
...
-1
votes
2
answers
4k
views
which values are available in event.target and how to access it
i am following an online workshop and examples which you can find it here :
https://openlayers.org/en/latest/examples/mouse-position.html
in the example posted in the above mentioned link, in both of ...
-1
votes
1
answer
73
views
Marker is slightly shifted(Projection problem)
I have an app that displays gps markers on the map. The coordinates are from images and they are correct, but the marking is very inaccurate.
Here is my code:
https://stackblitz.com/edit/angular-ivy-...
0
votes
1
answer
688
views
Why do I need getPointResolution when creating circle polygons in Openlayers?
So I saw an example of creating a polygon circle to scale. That is the actual distance from the point of interest to the how far the radius is.
map.on('postrender', function (event) {
const {...
0
votes
2
answers
267
views
Angular HTML is not showing total features from openlayers
I'm building application using Angular and Openlayers. I have a function working on zoomend which gives me a total number of features in the current box. I'm able to get the output in console.log but ...
0
votes
1
answer
1k
views
Openlayers - set specific projection for View
How can I set a specific projection for a Map? I am using Openlayers 6 in an Angular 10 context.
The map is loaded in EPSG:3857 and I would like to use it via a projection EPSG:28992.
Try 1:
proj4....
0
votes
1
answer
739
views
Openlayers - transform polygon from a specific projection like EPSG:28992
How can I add a simple polygon with a specific projection to my map?
The polygon is valid, I checked before.
coordinatesPolygonInRd = [ [ [173563, 441818], [173063, 441818], [173063, 444318],
[...
0
votes
1
answer
2k
views
Angular/Openlayers6: show a polygon on a map
How can I draw a polygon on a map using Openlayers 6 and Angular 10?
My component HTML file is:
<div id="map" class="map"></div>
The component's styling:
.map {
...
0
votes
1
answer
81
views
Find index of OpenLayers array
I'm having difficulty finding the index of this particular OpenLayers array.
The array looks like this.
Array(7)
0: PinchRotate {disposed_: false, pendingRemovals_: {…}, dispatching_: {…}, listeners_: ...
-3
votes
2
answers
660
views
Change Text of Individual labels on map ( OpenLayers )
I want to change the text of a place on OpenLayers map, it needs to be changed from Persian Gulf to Arabian Gulf
I tried to see if there is any way I can make this change using the OpenLayers API ...
1
vote
1
answer
499
views
OpenLayer 6.3.1 problem displaying GeoJson data on the map
I have problem with openlayer geojson. I'm trying to display data in the map, but nothing I try works.
What do I need to change to display the data on the map?
code:
var map = new Map({
controls: ...
2
votes
1
answer
3k
views
Angular 9 universal Server side rendering (SSR) error HTMLCanvasElement
Error: NotYetImplemented
at HTMLCanvasElement.Wo4J.exports.nyi (/path/server/main.js:1:3906285)
at rj.nf (/path/server/main.js:1:1929447)
at /path/server/main.js:1:1930713
at Object....
0
votes
1
answer
507
views
Implementing geocoder service for OpenLayers map in Angular project
I am working on an Angular project, part of which involves displaying a map with a marker on the given address. I wanted to use the geocoding (and reverse) service from Here, and I followed all the ...
2
votes
2
answers
2k
views
No Interactions working in OpenLayers 6 with Angular 9
I'm trying to setup an OpenLayers 6 Map in an Angular 9 component. I can successfully load the OSM source and the controls are working, but Interactions like dragging the map or zooming with the mouse ...