Questions tagged [angular-openlayers]

is a AngularJS directive for the OpenLayers JavaScript library

angular-openlayers-directive is a AngularJS directive for the OpenLayers 3 JavaScript library. It’s used to embed OpenLayers maps in an AnguarJS project.

Related Tags

References

110 questions
24
votes
2 answers

how to get the current zoom in openlayers

i have a question. i need to know the actual zoom of the open layers map $scope.refreshMap = function (lat, long) { map.setView(new ol.View({ projection: 'EPSG:4326', center: [long, lat], zoom: "here I do not know what…
7
votes
1 answer

How to position a static image overlay on top of OpenLayers 3 Map

I am using OpenLayers 3 to display indoor maps in an Angular/Ionic mobile app. The maps are static images that I am placing on top of the OpenLayers map. I am creating the map and adding the image layer like below. var extent =…
Wes Cole
  • 71
  • 1
  • 4
6
votes
3 answers

How to integrate openlayers 3 transform extension

I am working on an openlayers 3 project, developed using typescript, hence: let ol = require("openlayers"); I would like to use the transform extension plugin, which is not published on NPM…
vicgoyso
  • 636
  • 1
  • 14
  • 35
4
votes
2 answers

Change maxZoom option in runtime to ol.View in angular-openlayers-directive

I posted this question to change maxZoom in runtime using openlayers3 and that works perfect: map.setView(new ol.View({ zoom: 10, maxZoom: 17, minZoom: 10, })); However, im trying to integrate this solution using the…
3
votes
2 answers

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 TS2416: Property 'on' in type 'Geolocation' is…
Nealesh
  • 629
  • 6
  • 12
3
votes
1 answer

in openlayer angular directive zoom buttons does not show

I don't have any zoom button in map how can i show them? plus and minus i use angular openlayer directive
3
votes
2 answers

OpenLayers 3 dragBox on mobile

I'm currently implementing a dragBox to select multiple vectors at once. Since the dragBox object requires a "condition:" and in the official example it is a keyPress, "shift" I think, I have set up a singleton boolean variable in Angular that will…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
3
votes
1 answer

How to fit screen on map by setting zoom level manually?

I am new in openlayer maps,When you click on checkbox it will fit the maker on screen with full zoom in but I want to fit maker on screen with zoom level 11. map.getView().fit(source.getExtent(), map.getSize());
v. josh
  • 119
  • 1
  • 1
  • 12
3
votes
1 answer

Openlayers ol.style.Text with multiple colors

Is there a way to set multiple font colors for ol.style.Text class for openlayers 4+? I am trying to do something like const label = new ol.style.Style({ text: new ol.style.Text({ text: 'X other text', …
Tom
  • 173
  • 2
  • 13
2
votes
2 answers

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
  • 1
  • 27
  • 104
  • 226
2
votes
1 answer

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.ADia (/path/server/main.js:1:2061225) at…
2
votes
2 answers

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 wheel don't work. Manually adding the default…
2
votes
1 answer

OpenLayers increase or decrease extent by a percentage

I have a map that has features on it and when I zoom to those features the user has the ability to set a preference as to the zoom buffer. I'm not sure if there is a built-in way of doing this in OL...I've looked at the documentation but couldn't…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
2
votes
1 answer

Openlayers 4.6.5 & Angular 6 unable to remove drawn shapes at pixel

The problem is that when I try and remove the feature the this.vectorLayer.getSource().removeFeature() is throwing an error Cannot read property 'forEach' of undefined I can logged the feature absolutely fine so it's definitely grabbing it in the…
Munerz
  • 1,052
  • 1
  • 13
  • 26
2
votes
1 answer

How to place a HTML element on a map in OpenLayers

I am working on Openlayers 5.13 with jQuery 3.21. I am trying to place a html div element on the viewport of a map in openlayers. This element is supposed to have two check-boxes to filter out some content on the map. For this purpose I am using an…
1
2 3 4 5 6 7 8