{"action":"created","issue":{"url":"https://api.github.com/repos/walkermatt/ol-layerswitcher/issues/79","repository_url":"https://api.github.com/repos/walkermatt/ol-layerswitcher","labels_url":"https://api.github.com/repos/walkermatt/ol-layerswitcher/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/walkermatt/ol-layerswitcher/issues/79/comments","events_url":"https://api.github.com/repos/walkermatt/ol-layerswitcher/issues/79/events","html_url":"https://github.com/walkermatt/ol-layerswitcher/issues/79","id":347651570,"node_id":"MDU6SXNzdWUzNDc2NTE1NzA=","number":79,"title":"Module names-related errors while using with Angular6-OL5","user":{"login":"spimou","id":16806546,"node_id":"MDQ6VXNlcjE2ODA2NTQ2","avatar_url":"https://avatars2.githubusercontent.com/u/16806546?v=4","gravatar_id":"","url":"https://api.github.com/users/spimou","html_url":"https://github.com/spimou","followers_url":"https://api.github.com/users/spimou/followers","following_url":"https://api.github.com/users/spimou/following{/other_user}","gists_url":"https://api.github.com/users/spimou/gists{/gist_id}","starred_url":"https://api.github.com/users/spimou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spimou/subscriptions","organizations_url":"https://api.github.com/users/spimou/orgs","repos_url":"https://api.github.com/users/spimou/repos","events_url":"https://api.github.com/users/spimou/events{/privacy}","received_events_url":"https://api.github.com/users/spimou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-04T22:07:29Z","updated_at":"2018-08-05T07:56:19Z","closed_at":null,"author_association":"NONE","body":"I am using Angular 6 and OpenLayers 5.1.3. I installed the ol-layerswitcher by doing `npm i ol-layerswitcher --save` and it is installed in the `node_modules` of the node folder\r\n\r\n```\r\nproject\r\n-angular\r\n-lib\r\n-node_modules <<Here\r\n-routes\r\n-app.s\r\n-package.json\r\n```\r\n\r\nTo insert it in my angular code, in my angular component I do  \r\n```\r\nimport layerswitch from 'ol-layerswitcher';\r\nexport class myComponent {\r\n  ngOnInit() {    \r\n    this.olmap = new Map({\r\n      controls: defaultControls({\r\n        attributionOptions: {\r\n          collapsible: false\r\n        }\r\n      }).extend([\r\n        new ZoomToExtent({\r\n          extent: [\r\n            813079.7791264898, 5929220.284081122,\r\n            848966.9639063801, 5936863.986909639\r\n          ]\r\n        }),\r\n        new layerswitch({})//use it here\r\n      ]), \r\n      layers: [this.tilelayer,this.vectorlayer],\r\n      target: 'map',      \r\n      view: this.view,\r\n      projection: 'EPSG:3857'\r\n    });\r\n  }\r\n}\r\n```\r\n\r\nThis works fine, the map in the UI and the ol-layerswitcher work, but I get the following errors in my console\r\n\r\n```\r\nWARNING in ../node_modules/ol/Observable.js\r\nThere are multiple modules with names that only differ in casing.\r\nThis can lead to unexpected behavior when compiling on a filesystem with other case-semantic.\r\nUse equal casing. Compare these module identifiers:\r\n* C:\\myproject\\node_modules\\ol\\Observable.js\r\n    Used by 4 module(s), i. e.\r\n    C:\\myproject\\node_modules\\ol\\Object.js\r\n* C:\\myproject\\node_modules\\ol\\observable.js\r\n    Used by 1 module(s), i. e.\r\n    C:\\myproject\\node_modules\\ol-layerswitcher\\dist\\ol-layerswitcher.js\r\n\r\nWARNING in ../node_modules/ol/control/Control.js\r\nThere are multiple modules with names that only differ in casing.\r\nThis can lead to unexpected behavior when compiling on a filesystem with other case-semantic.\r\nUse equal casing. Compare these module identifiers:\r\n* C:\\myproject\\node_modules\\ol\\control\\Control.js\r\n    Used by 18 module(s), i. e.\r\n    C:\\myproject\\node_modules\\ol\\control.js\r\n* C:\\myproject\\node_modules\\ol\\control\\control.js\r\n    Used by 1 module(s), i. e.\r\n    C:\\myproject\\node_modules\\ol-layerswitcher\\dist\\ol-layerswitcher.js\r\ni ｢wdm｣: Compiled with warnings.\r\n```\r\nI am an angular newbie and I have not used OL in years, so I am confused, please help to understand what those errors mean and how to fix them. \r\n\r\nThank you very much"},"comment":{"url":"https://api.github.com/repos/walkermatt/ol-layerswitcher/issues/comments/410502938","html_url":"https://github.com/walkermatt/ol-layerswitcher/issues/79#issuecomment-410502938","issue_url":"https://api.github.com/repos/walkermatt/ol-layerswitcher/issues/79","id":410502938,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDUwMjkzOA==","user":{"login":"walkermatt","id":600349,"node_id":"MDQ6VXNlcjYwMDM0OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/600349?v=4","gravatar_id":"","url":"https://api.github.com/users/walkermatt","html_url":"https://github.com/walkermatt","followers_url":"https://api.github.com/users/walkermatt/followers","following_url":"https://api.github.com/users/walkermatt/following{/other_user}","gists_url":"https://api.github.com/users/walkermatt/gists{/gist_id}","starred_url":"https://api.github.com/users/walkermatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walkermatt/subscriptions","organizations_url":"https://api.github.com/users/walkermatt/orgs","repos_url":"https://api.github.com/users/walkermatt/repos","events_url":"https://api.github.com/users/walkermatt/events{/privacy}","received_events_url":"https://api.github.com/users/walkermatt/received_events","type":"User","site_admin":false},"created_at":"2018-08-05T07:56:19Z","updated_at":"2018-08-05T07:56:19Z","author_association":"OWNER","body":"I think this is due to us needing to update the layerswitcher to OpenLayers v5. I've just created [an `ol5` branch](https://github.com/walkermatt/ol-layerswitcher/tree/ol5) for the work.\r\n\r\nIf you update your `package.json` to specify `git+https://github.com/walkermatt/ol-layerswitcher.git#ol5` as the \"version\" you should be able to test against an OpenLayers v5 compatible version of the layerswitcher."}}
{"actor":{"display_login":"walkermatt"}}