Skip to main content

Questions tagged [angular]

Questions about Angular (not to be confused with AngularJS), the web framework from Google. Use this tag for Angular questions which are not specific to an individual version. For the older AngularJS (1.x) web framework, use the angularjs tag.

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

Polyline from coordinates array in OL v9.2.2

I'm trying to implement something like this example in Angular 17. I can't replicate this part: const polyline = result.routes[0].geometry; const route = new Polyline({ factor: 1e6, }).readGeometry(...
Tatoh's user avatar
  • 3
1 vote
1 answer
51 views

Panning during draw interaction breaks tracing of the draw interaction in OpenLayers

I have a draw interaction where I draw on an existing linestring feature in an Angular application. I start the draw interaction with tracing active to this linestring. When i pan after starting the ...
Joachim's user avatar
  • 13
0 votes
1 answer
32 views

Openlayers 4.6.4 version vector layer with 150 features not working when we dynamically set text only in Chrome laptop/ PC

I have map with a layer consists of more than 150 features. I'm setting text dynamically for each features. For some reason, the texts are not rendered as expected only in Google Chrome of laptop. I'm ...
Suvethan Nantha's user avatar
1 vote
1 answer
90 views

Javascript Esri 4.27 request.Interceptors errorCallback gives error message and not error code

I have implemented ESRI 4.27v in my Angular Project. My requirement is to pass all the Map API calls via interceptor and catch for 500 error which comes on server down and implement a retry mechanism. ...
Priya Ganesan's user avatar
1 vote
1 answer
136 views

SVG icons for Point style are not loaded in OpenLayers

I have a case in which I should display icons for locations on the map. But, it seems like OpenLayers has issues accessing page's Assets folder. Or there's another issue I'm not aware of, because I ...
mat.hudak's user avatar
  • 167
1 vote
2 answers
191 views

Leaflet custom layers: how to make them to be combined by user?

I have created a Leaftlet map in an Angular project, using an extended version of tileLayer WMS class: export class ExtendedWMS extends TileLayer.WMS { constructor(baseUrl: string, options: ...
smartmouse's user avatar
0 votes
0 answers
36 views

Pre-selection of features does not work

We are implementing a tool which allows users to select a so called Section on the map and edit its Segments. One Section consists of one or more Segments and is always displayed as a single line. ...
mat.hudak's user avatar
  • 167
0 votes
0 answers
68 views

ArcGIS vector tile layer [view:goto-interrupted]: Goto was interrupted error

I am using vector tile layer in my Angular project to load ESRI map const point = { type: "point", // autocasts as new Point() longitude: long, latitude: ...
Priya Ganesan's user avatar
0 votes
1 answer
349 views

JavaScript formula to convert WGS84 lat, long values to RD_New co-ordinates [closed]

I have a requirement in my project to convert WGS84 GPS format co-ordinates to RD_New co-ordinates WGS84(E,N): 51.998929,4.375587 RD(X,Y): 85530,446100 I see some online tools and Proj4 js ...
Priya Ganesan's user avatar
0 votes
0 answers
59 views

Can't snap to the another feature while translating/move Interaction in OpenLayers

When I try to snap one feature to another feature while translating the feature it was not snapping?? Here is my code : moveFeatures(): void { if (this.selectInteraction) { let ...
Marudi Abhinaya's user avatar
0 votes
0 answers
24 views

Deactivate map's 'on' listener in OpenLayers

Is there a way to deactivate simple on listener? I want to create some Points on the map, only if a dialog is opened and do that until user hits the 'Calculate Route' button. Once one of those two ...
mat.hudak's user avatar
  • 167
3 votes
2 answers
273 views

Multiply line using style in OpenLayers

I'm working on a map application, where I should display multiple routes, each with its own name and coloring. In some locations, there are multiple routes following the same path. Is there a way to ...
mat.hudak's user avatar
  • 167
0 votes
0 answers
121 views

Is there a easy way to get the Grid convergence in QGIS?

Is there an easy way to get the angular difference between Grid North & True North in QGIS? This is how I do it: Make a map in print composer Set the map CRS to whatever "WGS 84 / UTM zone&...
SubXi's user avatar
  • 11
0 votes
0 answers
73 views

Getting color of selected LineString in OpenLayers?

I have a dynamically generated layers of LineStrokes which get their color from the API call. I only have a basic style for them, to which a color is set when I receive data from API and each layer ...
mat.hudak's user avatar
  • 167
1 vote
1 answer
57 views

Selecting two adjecent line strings with select interaction in OpenLayers?

I have a map displaying various paths, separated to the segments, which are of type Feature<LineString>. We have a request to implement functionality allowing users to merge two neighboring ...
mat.hudak's user avatar
  • 167
0 votes
1 answer
342 views

Testing 'pointermove' event in OpenLayers on Angular

I have a method to create and display a tooltip on the map on mouse hover over a feature on the map. Code sample as follows: createTooltip(map) { map.on('pointermove', (e) => { const ...
user2444642's user avatar
1 vote
0 answers
77 views

Function to get style called repeatedly - Angular OpenLayers

I have a functionality where I can modify a polyline by dragging its coordinates over the map. In order to visually separate it from untouched polylines, I apply a new style when creating the ...
mat.hudak's user avatar
  • 167
0 votes
0 answers
112 views

Offset overlapping lines in multiple vector layers in OpenLayers?

I have a feature in the Angular application where user can chose a layer to be drawn on map. Multiple layers with overlapping lines can be drawn at the same time. I use a dynamically created ...
mat.hudak's user avatar
  • 167
0 votes
1 answer
202 views

OpenLayer's VectorSource only adding first feature of array

I'm working on an angular implementation of OpenLayers: the component receives a Map instance and a Feature[] observable. The component attaches the Map instance to the view and after doing so, it ...
Nicolás Aranda's user avatar
5 votes
1 answer
382 views

Unable to remove GeoJSON features/layer in Leaflet

I am able to select a decal and display the GeoJSON on the map. Once I select another decal from the select dropdown it shows the new GeoJSON shape but doesn't remove the old ones. I've tried multiple ...
Nat's user avatar
  • 65
0 votes
0 answers
78 views

Polygon will not display in angular / JavaScript layer

I have allowed the user to draw a polygon and save the points to Firestore. When the page loads, Firebase retrieves the polygon coordinates relevant to a location. When I create the polygon rings ...
Karl Ennis's user avatar
0 votes
0 answers
47 views

Why Google satellite tiles loading multiple times?

I am using following code for adding Google satellite tiles. let OSLayer = new TileLayer({ type: 'base', visible: true, zIndex: -1, source: new XYZ({ url: 'http://mt0.google....
Tojoy's user avatar
  • 69
0 votes
0 answers
173 views

How to add Multiple icons on single line string

I want to add multiple arrow on single line string with animated arrow This Editor I want when we click start button then add one arrow icon on line string and when we click again start button then ...
Sanjay Singh's user avatar
0 votes
1 answer
633 views

ArcGIS JS - How to destroy, clear, erase, free and get rid of features?

I'm using ArcGIS JS 4.25.5 and Angular 14. I have a map where I can dynamically load and unload layers, and this map serves multiple purposes throughout the software, so I have to strip out all the ...
Docmur's user avatar
  • 101
3 votes
1 answer
1k views

How can I get to the updated coordinates from edited L.polygon?

There is a polygon come from api and I need to update coordinates with edit layer by angular-draw leaflet. Here is the html, <div style="height: 100vh;" leaflet leafletDraw ...
Nil's user avatar
  • 39
1 vote
1 answer
458 views

How to get extent of drawn rectangle feature in OpenLayers 6

My code: var geometryFunction, maxPoints; const value = 'Circle'; geometryFunction = createBox(); const source = new VectorSource({wrapX: false}); const vector = new VectorLayer({ ...
Tojoy's user avatar
  • 69
1 vote
0 answers
78 views

Isolated marker won't be displayed when filters are applied to be the single one amongst nearby clusters

I have markers all around the world, thousands of them. In some areas more close to each others, in other areas some even have a number of countries between them. Let's take the SINGLE marker in ...
Art's user avatar
  • 11
1 vote
1 answer
1k views

Trigger click event on existing map marker

I am showing some markers using latitude and longitude, but there is a navigation drawer view, where I can click on the location. So if I click on any particular location from the drawer, how can I ...
Sanoop Surendran's user avatar
2 votes
2 answers
2k views

Change popup content with JavaScript

How can I dynamically change the HTML content of a Leaflet popup using JavaScript? I have text in the popup that I want to change when it's clicked: map_layer = L.geoJSON(countries, { ...
user9506231's user avatar
2 votes
1 answer
802 views

Leaflet geoJSON - function within setStyle()

I have 2 styling methods for countries on my map: style_init() for the initial style of a country, style_new() for when a country changes and I want to re-style it on the map: style_init(feature: any) ...
user9506231's user avatar
1 vote
0 answers
148 views

Grouping icons/ tools in Esri Expand Widget

I am currently adding multiple icons to an Angular based Esri Web Map. My current approach is: defining the icon in app.component.html: <div id="flyToNextExtent" class="...
Riccardo's user avatar
  • 2,668
1 vote
0 answers
326 views

Adding angular component to MapView.UI ESRI JS API

Stack: (Angular 13.x, ESRI JS API 4.22) I have three components Form (first thing the users see when the app loads) Dashboard component ( it contains the component bellow ) mapview.component.ts (this ...
Roy Arturo's user avatar
2 votes
0 answers
195 views

Leaflet Directive performance issues with 7539 GEOjson features

I'm using this example for my map but it seems that the map performance is pretty bad when zoomed. Currently the map have 7539 geojson objects (features) and in the future they will be around 9500. I ...
Ivailo Popov's user avatar
2 votes
1 answer
633 views

OpenLayers/Angular/ol-cesium : Point vectors show on both 2D/3D map / polygons don't

I am working on a existing app made with Angular 13. I use OpenLayers 6+ and the npm package ol-cesium. I have an Angular component where I display a map (2D - OpenLayers). Everything goes as planned. ...
M Matthieu's user avatar
1 vote
1 answer
41 views

Angular analysis in sDNA - sensitivity to small angular changes in road segments

Space syntax analysis based on shortest angular path has a few issues due to the segregated design, with small changes in angles along a generally straight route adding to the summed angular changes ...
SPet's user avatar
  • 141
0 votes
1 answer
632 views

OpenLayers OverviewMap control?

I want to change the overview map position to left side of the collapse listener.I am getting the map like as below image.I need map in black box. const overviewMapControl = new OverviewMap({ // ...
Tojoy's user avatar
  • 69
0 votes
1 answer
166 views

Displaying all layers in ArcGIS feature service in Angular application

As you can see in the below living atlas layer, there are multiple layers inside (state,county,tract etc..) But when I add https://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/...
Kalana Tebel's user avatar
1 vote
0 answers
2k views

How can I get the canvas of map object?

I have an angular component in my application. export class MyComponent implements OnInit { isActive: boolean = false; constructor(private mapComponent: MapComponent) { } do(){ console....
barteloma's user avatar
  • 1,714
0 votes
0 answers
676 views

Geofences in Leaflet with live Location

I'm a newbie in terms of programming. I'm building a Web App with Angular and Leaflet, which has to locate the users position and notify him in case he is close to specific buildings. There are ...
Layer8Issue's user avatar
1 vote
1 answer
640 views

De-highlight highlighted features with button click in OpenLayers?

.html button type="button" value="Click" id="chiru">chiru</button .ts this.map.on('singleclick', event => { const feature = this.map.forEachFeatureAtPixel(...
Tojoy's user avatar
  • 69
1 vote
0 answers
911 views

Only get pointermove event from OpenLayers when mouse button is pressed

I'm trying to get hover position with 'pointermove' event from OpenLayers Map. const source = new OlXYZ({ url: 'https://tile.osm.org/{z}/{x}/{y}.png' }); this.layer = new ...
Kim Gunnarsson's user avatar
2 votes
1 answer
466 views

Adding a PNG image to a WFS layer in an OpenLayers?

style: function () { var path = "./../../../assets/icon/" var featureImage = 'track.png'; return new Style({ image: new Icon({ opacity: 1, src: ...
Tojoy's user avatar
  • 69
2 votes
1 answer
221 views

Get the properties of highlighted features when de-highlighting one of them in OpenLayers?

this.map.on('singleclick', event => { const feature = this.map.forEachFeatureAtPixel(event.pixel, (feature) => { console.log(feature); return feature }) if(feature ...
Tojoy's user avatar
  • 69
-1 votes
1 answer
237 views

Adding multiple Marker animation by route id in OpenLayers by angular [closed]

I want to show more than route in map like in this example http://www.geocodezip.com/v3_SO_multipleMarkerAnimation.html but generate it by id and with different color from json I follow this link ...
Doaa Othman's user avatar
0 votes
1 answer
249 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 ...
Karthik Bhat's user avatar
0 votes
0 answers
21 views

Leaflet gives javascript error after rendering [duplicate]

I get javascript errors but the map is visible without any problems. My code ts file options = { layers: [ tileLayer("https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png",{...
user2837961's user avatar
0 votes
0 answers
173 views

Clear of vector is not happening in OpenLayers

I have a screen where I have a button 'A' on click of which a popup opens. In that popup, I have a map which consist a vector layer (Polygon). I have another button 'Remove Shape' in that popup. Now ...
shashank patni's user avatar
0 votes
1 answer
741 views

Authentication to GeoNetwork by third party application

I linked the users table of GeoNetwork 3.10.2 with my application database so everytime I create/update a user in the app is also created/updated in geonetwork, now I want that once I log in the app, ...
Ayoub Beltarchi's user avatar
0 votes
1 answer
1k views

QGIS2web Export open layers map as PDF, PNG or JPEG

I want to have an option to export my map as the PDF I would like to use the example from here: https://openlayers.org/en/latest/examples/export-pdf.html but it doesn't work unfortunately. All the ...
Geographos's user avatar
  • 4,049
2 votes
1 answer
510 views

Canvas wider than containing div (OpenLayers)

Map canvas is wider than the containing map div. Causes problems when zoom to extent etc. Using Angular Material Flex-Layout / OpenLayers 6. // css .mapContainer { height: 100%; padding: 16px; } ...
Kake's user avatar
  • 21