{"action":"created","issue":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750","labels_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750/labels{/name}","comments_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750/comments","events_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750/events","html_url":"https://github.com/wet-boew/wet-boew/issues/6750","id":74356490,"number":6750,"title":"Geomap prevents definition of layer options on WMS basemap layer","user":{"login":"jfbourgon","id":1030226,"avatar_url":"https://avatars.githubusercontent.com/u/1030226?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbourgon","html_url":"https://github.com/jfbourgon","followers_url":"https://api.github.com/users/jfbourgon/followers","following_url":"https://api.github.com/users/jfbourgon/following{/other_user}","gists_url":"https://api.github.com/users/jfbourgon/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbourgon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbourgon/subscriptions","organizations_url":"https://api.github.com/users/jfbourgon/orgs","repos_url":"https://api.github.com/users/jfbourgon/repos","events_url":"https://api.github.com/users/jfbourgon/events{/privacy}","received_events_url":"https://api.github.com/users/jfbourgon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wet-boew/wet-boew/labels/Plugin:%20Geomap","name":"Plugin: Geomap","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-08T13:00:48Z","updated_at":"2015-06-18T18:43:52Z","closed_at":null,"body":"According the the online documentation http://wet-boew.github.io/wet-boew/docs/ref/geomap/geomap-en.html (see Basemap configuration example), it should be possible to define layer options such as `singleTile: true` or `opacity: 0.5` on a WMS basemap layer.\r\n\r\nHowever current geomap-lib codebase prevents doing this because the layer options object is hardcoded to `isBaseLayer: true` and connot be extended\r\n```javascript\r\nif ( hasBasemap ) {\r\n    if ( basemap.type === \"wms\" ) {\r\n        keys = getLayerKeys( basemap );\r\n        geomap.map.addLayer(\r\n            new OpenLayers.Layer.WMS(\r\n                basemap.title,\r\n                basemap.url,\r\n                keys,\r\n                {\r\n                    isBaseLayer: true\r\n                }\r\n            )\r\n        );\r\n```\r\n\r\nFollowing proposed code would allow definition of layer options on a WMS basemap layer.\r\n```javascript\r\nif ( hasBasemap ) {\r\n    if ( basemap.type === \"wms\" ) {\r\n        keys = getLayerKeys( basemap );\r\n        layerOptions = keys['options'];\r\n        layerOptions.isBaseLayer = true;\r\n        geomap.map.addLayer(\r\n            new OpenLayers.Layer.WMS(\r\n                basemap.title,\r\n                basemap.url,\r\n                keys,\r\n                layerOptions\r\n            )\r\n        );\r\n```"},"comment":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/comments/113254238","html_url":"https://github.com/wet-boew/wet-boew/issues/6750#issuecomment-113254238","issue_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750","id":113254238,"user":{"login":"hsrudnicki","id":8570320,"avatar_url":"https://avatars.githubusercontent.com/u/8570320?v=3","gravatar_id":"","url":"https://api.github.com/users/hsrudnicki","html_url":"https://github.com/hsrudnicki","followers_url":"https://api.github.com/users/hsrudnicki/followers","following_url":"https://api.github.com/users/hsrudnicki/following{/other_user}","gists_url":"https://api.github.com/users/hsrudnicki/gists{/gist_id}","starred_url":"https://api.github.com/users/hsrudnicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsrudnicki/subscriptions","organizations_url":"https://api.github.com/users/hsrudnicki/orgs","repos_url":"https://api.github.com/users/hsrudnicki/repos","events_url":"https://api.github.com/users/hsrudnicki/events{/privacy}","received_events_url":"https://api.github.com/users/hsrudnicki/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T18:43:52Z","updated_at":"2015-06-18T18:43:52Z","body":"@jfbourgon @jvanulde @LaurentGoderre : Can this issue be closed?"}}