Questions tagged [openlayers]

OpenLayers is an open source Javascript web mapping library for creating web map applications.

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

How to contrast stretch multiple bands Geotiff in Openlayers?

In Openlayers,I want to realize render multiple bands Geotiff by Contrast Stretch Min and Max. Like by QGIS or Geoserver using SLD: <sld:RasterSymbolizer> <sld:ChannelSelection> <sld:...
George's user avatar
  • 13
-1 votes
0 answers
25 views

How can I create a layer in OpenLayers to display the path of a drone using GeoJSON?

import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import { hasEmptyValue, ToggleSwitch, Text } from 'lib'; import '../../stylesheets/components/Video/...
Pranjal Bansal's user avatar
-1 votes
0 answers
22 views

Adding markers to openlayers

I have a map where users should be able to click where they want and a marker will be added, when they add a new marker, a line will connect to the previous one creating a route. The route doesn't ...
Alejandro's user avatar
1 vote
1 answer
35 views

d3 points over openlayers map

I am trying to plot points in a openlayers map from a geoJson file with d3 but nothing appears on the screen. I was able to plot points in a random place that moved around when I scrolled the map but ...
Henrique Tavolaro's user avatar
-2 votes
1 answer
37 views

Need help implementing a Case Statement in OpenLayers for varying pin color based on location status

In OpenLayers, I am trying to populate a world map of customer locations with pins that will vary in color based upon a certain status of that location. The status are numebred 0-4 and the first ...
Rashy's user avatar
  • 1
0 votes
0 answers
20 views

OpenLayer adjust circle radius during zoom

I saw many questions but none of them works with me. I create some circles in a loop. var coordenada = ol.proj.fromLonLat([coordenada_y , coordenada_x]); coordenada_x = parseFloat(coordenada_x); ...
adrian's user avatar
  • 97
-1 votes
0 answers
27 views

Layer showing in legend but not in my map? [closed]

var view = new ol.View({ projection: 'EPSG:4326', center: [10.70, 36.50], zoom: 5, }); var view_ov = new ol.View({ projection: 'EPSG:4326', center: [10.70, 36.50], zoom: 7, });...
Med Tlili's user avatar
0 votes
1 answer
52 views

Openlayers - Select Interaction - don't change style for point geometries with ol.style.Icon and ol.style.FontSymbol

I'm trying not to change style during the selection of point geometries that have style ol.style.Style in which ol.style.Icon is configured in some cases and ol.style.FontSymbol in others ol.style....
andreaordonselli's user avatar
0 votes
0 answers
18 views

Turf js lineIntersect and graphic intersection of two lineStrings are not same

I'm trying to draw intersection point of two lines, but visually it is not correct intersection point. Is there any idea? I'm using openlayers as map. // draw two lines on the map: const ...
Lukyanenko Mikhail's user avatar
-1 votes
1 answer
20 views

Add multiple routes with info window in a single ol map

I am trying to get the multiple routes/directions with markers and line from start to end points. I have tried 2 different methods both using osrm api. In the first one though I am getting the route, ...
Mubashir Rehman's user avatar
0 votes
1 answer
18 views

OpenLayers: can't render two tiff files almost the same

I have created this codesandbox example, in which I render without any style a tiff: https://codesandbox.io/s/cog-test-aspect-kriw38?file=/main.js The tiff source is this https://andy-aws.s3.eu-north-...
aborruso's user avatar
  • 4,648
-1 votes
0 answers
23 views

how to change the COLORRANGE in MapServer using URL parameters?

how to change the COLORRANGE parameter in MapServer using URL parameters ? to change COLOR am using this [${layerName}.CLASS[index}].STYLE[index}]]: COLOR 255 145 0 but not work for COLORRANGE
preppy dev's user avatar
0 votes
1 answer
69 views

Laravel 10 with vue doesn't work for me, the app.js file can't find it

This line is giving me an error: <script type="text/javascript" src="{{ URL::asset('/js/app.js') }}"></script> The system is running: Vite v4.3.5, ready in 1142 ms ...
AkilesFelipe's user avatar
0 votes
1 answer
22 views

Adding a ShpFile tilts the map

I'm using OpenLayer with react. I'm display a map as a baselayer and then I'm adding a GeoTiff on top of it. After that the user can also add a shape file (zip) as another layer and it is working ...
Zullu Balti's user avatar
0 votes
1 answer
63 views

In Openlayers How to render multiple bands geotiff tile from WMTS?

I have loaded muiltple bands geotiff using Openlayers with ol.source.WMTS, And I want to render customized style with some of the bands value. I kown I can use geotiff.js and canvas or COG Geotiff to ...
George's user avatar
  • 13
0 votes
0 answers
43 views

cross-origin read blocking (corb) blocked cross-origin error OpenLayers Offline Map with tileserver-gl-light server

I want to use offline Map for my openLayers project , I am using openLayers 7 and a mapTiler file mbtiles and TileServer GL light for serving my map , I use this code const raster = new TileLayer({ ...
simbad1999's user avatar
0 votes
0 answers
27 views

OpenLayers: How to get the WMS Time animated map to load without resizing in an R Shiny app?

In this R Shiny app https://github.com/DanielEWeeks/NWS_WeatherShinyApp I have added the WMS Time animated weather radar map from this OpenLayers example https://openlayers.org/en/latest/examples/wms-...
Daniel E. Weeks's user avatar
-4 votes
0 answers
40 views

Style function best practice

I’m currently looking at some existing code for loading the results on a WFS request. The code iterates over the list of features and sets new Style objects on each feature. To me this does not seem ...
Tom's user avatar
  • 23
-1 votes
0 answers
26 views

caught TypeError: markerOverlay.setStyle is not a function when using openLayer

I want to show a map via the OpenLayers library where the user can select a location, and I could get latitude and longitude coordinates. Following are the codes that I wrote : var myMap = new ol.Map({...
Ahmad Badpey's user avatar
  • 6,306
1 vote
0 answers
41 views

Position of rendered GeoTiffs are inconsistent

I'm using React With OpenLayers to render a GeoTiff overlay on top of a map (mapbox satellite). The problem I'm facing is that sometimes these geoTiff files are a little bit off of their original ...
Jan-Hein van Asseldonk's user avatar
0 votes
0 answers
16 views

Openlayers tilelayer on error does not print error correctly

I created a way to switch between 2 osm in my application by clicking on a button. What I'm trynig to archieve here is to have error printed when the OSM layer is recreating, if customer set a bad url ...
Jérome BORGA's user avatar
-1 votes
0 answers
32 views

Openlayers geolocation heading displaying 90 degrees off

I am using openlayers geolocation to collect both gps location and heading with high accuracy turned on. When I render the application for smart phones the rotation turns the map so my point is ...
James's user avatar
  • 694
1 vote
1 answer
34 views

open layers only draw features around 0,0

I have an application that I can upload csv, kml, geojson, etc... files too and I am supposed to draw the features that are included within this file to the map. I validated that the file content is ...
Ahmed Gaafer's user avatar
  • 1,575
0 votes
0 answers
65 views

In Openlayers how do we print the frame area's in pdf, instead of all the canvas area and also how to print multiple frames as pages as a pdf?

In Openlayers how do we print the frame area's in pdf? instead of all the canvas area, and also how to print multiple pages / frames as pages as a pdf? I tried the options, this.workspaceFacade.map....
Surender Rengaraj's user avatar
0 votes
1 answer
59 views

How to pass multiple parameters to lambda function

i would like to know please how can i pass some parameters to the labmda function this.func? i want to be able to pass three parameters including the event, and display its contents using console.log ...
LetsamrIt's user avatar
  • 4,204
0 votes
0 answers
31 views

How to zoom in extent with Postgis X/Y in openlayers v7

I have a problem to zoom the nearest possible from extent on a map with Postgis data. I have try to zoom from geometry but always land in an other location. In first place I call Postgis with this ...
florian paumier's user avatar
2 votes
1 answer
57 views

Why is the radius of my circle drawn with Open Layers huge?

I'm trying to draw a circle around some set of coordinates with a radius in meters using OpenLayers 7. The circle center is correct, but the radius ends up being around 10^5 times larger than expected....
adolfohw's user avatar
0 votes
0 answers
25 views

Update feature style outside a mapInteraction function

I am creating an accessible way of navigating the features on an Openlayers map. This is done by creating a ul of buttons, where each button has the id of a feature displayed on the map as it's value. ...
Tomer_Ra's user avatar
  • 123
2 votes
2 answers
53 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 ...
LetsamrIt's user avatar
  • 4,204
-2 votes
1 answer
28 views

Eventhandler when a marker / feature is clicked

I googled on this subject and found examples where people are using Overlays to display popups when a marker is clicked or changing the style of the feature when a feature is clicked. But I want to ...
Knows Not Much's user avatar
0 votes
0 answers
49 views

bootstrap button toolbar style is not applied

I created a 'AddCustomElement' class to create button toolbar, button group and button like this : import '@fortawesome/fontawesome-free/css/all.css'; import 'bootstrap/dist/css/bootstrap.css'; import ...
vprint's user avatar
  • 41
2 votes
0 answers
56 views

Can't set rotation using extended class

I want to implement a children class to modify the map orientation. I have a main.js file exporting 'MainMap' : import './style.css'; import 'ol-ext/dist/ol-ext.min.css'; import {Map, View} from 'ol'; ...
vprint's user avatar
  • 41
0 votes
0 answers
46 views

Openlayers, infer Feature type from FeatureLike

Modifying a feature emits the following events. import { ModifyEvent } from "ol/interaction/Modify"; type DrawToolEvent { type: string me: ModifyEvent layer: VectorLayer<any> } ...
hgJang's user avatar
  • 83
0 votes
2 answers
68 views

Openlayers - repeat labels along MultiLineString geometry

Good morning, I'm trying to configure a label that repeats every few meters/pixels/millimeters in a geometry type MultiLineString. I would like a result like this configured with qgis: Here is an ...
andreaordonselli's user avatar
0 votes
1 answer
26 views

How to embed OpenLayers 7.3.0 on a Jekyll layout?

I would like to use OpenLayers to embed a map in a Jekyll layout. (The whole site is hosted on GitLab pages and built with a GitLab CI workflow.) To this end, I created a file in _includes with a div ...
user149408's user avatar
  • 5,265
0 votes
1 answer
53 views

How to change the color of my SVG marker in OpenLayers 7

I'm not even sure if this is possible but I am trying to change the color of a marker on an open layers 7 map. The marker is being added from an svg file using the following lines of code: const ...
user3182413's user avatar
0 votes
1 answer
36 views

Create a circle with a radius & projection - Open Layers

Currently whenever I zoom in / out my circle looses the area or the radius will be incorrect, I guess my radius need to have a projected to the map. Here is my code ... var circle = new ol.layer....
Asanda Lamba's user avatar
0 votes
1 answer
60 views

Issue placing a marker in the correct spot on an OpenLayers 7 map

I am creating a webapp that allows user to create mulitple maps. On each map the user has the ability to add/remove a marker. They are then able to drag it into the appropriate location and/or change ...
user3182413's user avatar
0 votes
1 answer
66 views

Rendering a GeoTiff file as an overlay on a map file

I'm using OpenLayers to render a GeoTiff file and now I want to display an ariel/satellite map as a baseLayer to it. The problem is that I can only render one layer for some reason, here' my code ...
Zullu Balti's user avatar
-1 votes
1 answer
18 views

OpenLayers embedded in layout with navigation bar; map size and anchor

I am designing a web site based on GitLab’s Jekyll Creative theme, into which I want to embed a map using OpenLayers 7.3.0. The theme has a navigation bar, 50 px in height, that stays on top all the ...
user149408's user avatar
  • 5,265
0 votes
1 answer
31 views

Leaflet vs Openlayers check color pixel of wms layer

I have this in OpenLayers to check if the cursor is in a point of a wms layer. map.on('pointermove', function (evt) { if (evt.dragging) { return; } ...
adrian's user avatar
  • 97
0 votes
1 answer
32 views

RLayers RLayerVector no height

I'm trying to use RLayers for a project, but I'm having a hard time with pretty simple task: "Add some 1 by 1 km squares to the map". I don't know if it's the issue, but I can see when I ...
G. B. Wanscher's user avatar
0 votes
1 answer
43 views

How to change the src of a feature on an OpenLayers 7 map

I am trying to create a map using OpenLayers 7 that will allow the user to change the style of the marker being used. I can't seem to figure out how to change the src of the feature being used as my ...
user3182413's user avatar
-1 votes
1 answer
40 views

Is there a way to change the scale of a feature after it has been placed in openlayers 7?

Is there a way to update the scale of an icon being placed on an openlayers map after it's been placed there? I have map with a marker icon on it. I'd like the user to be able to make the icon larger/...
user3182413's user avatar
1 vote
1 answer
38 views

How to tell if a point is visible on current OpenLayers map

Hi I'm trying to figure out if a given point is currently visible on my map. I'm using open layers 7 and have a simple map with a marker on it. User can move both the map and the marker independently....
user3182413's user avatar
0 votes
0 answers
64 views

Import childComp in openlayers sidebar

I'm trying to implement this basic child component (ChildComp.vue): <template> <h2>A Child Component!</h2> </template> into an openlayers Map.vue script : <template> ...
vprint's user avatar
  • 41
0 votes
0 answers
160 views

Internal error: 0x00000502: Vertex buffer is not big enough for the draw call" on chrome while using openlayer library with webGL

We are attempting to integrate the OpenLayer library's vector tiles with webGL. The following warning appeared on the console when the data was loading and the marker was being drawn on the map. `App:...
Mukit's user avatar
  • 1
0 votes
1 answer
30 views

OpenLayers: How can I move the shortest distance to fit an extent?

Click on the blue circle, the map will move a long distance and the blue circle will appear from the right edge of the map. This movement is strange. The blue circle should only need to move a short ...
Eric G's user avatar
  • 336
0 votes
0 answers
13 views

Draw 2 or More Features with 1 Draw Interaction

Our application draws 3 geometries: centerLine, centerToEdgesLines, boundaryPolygon (in 1 geometry collection) Is it possible to use Openlayers Draw interaction (LineString) to draw 3 Features instead ...
Lydon Ch's user avatar
  • 8,617
-1 votes
1 answer
18 views

How to display a specific Local Distribution Zone (LDZ) and hover/click to have the targetted region information using OpenLayers extension?

There are several regions over UK: North East, North West, Yorkshire and The Humber, East Midlands, West Midlands, East of England, London, South East, and South West. A user will focus a region and ...
Matteus Barbosa's user avatar

1
2 3 4 5
100