{"action":"created","issue":{"url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750","repository_url":"https://api.github.com/repos/wet-boew/wet-boew","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-08T13:00:48Z","updated_at":"2016-05-25T12:19:59Z","closed_at":"2015-07-28T17:52:50Z","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/221557033","html_url":"https://github.com/wet-boew/wet-boew/issues/6750#issuecomment-221557033","issue_url":"https://api.github.com/repos/wet-boew/wet-boew/issues/6750","id":221557033,"user":{"login":"josegar74","id":1695003,"avatar_url":"https://avatars.githubusercontent.com/u/1695003?v=3","gravatar_id":"","url":"https://api.github.com/users/josegar74","html_url":"https://github.com/josegar74","followers_url":"https://api.github.com/users/josegar74/followers","following_url":"https://api.github.com/users/josegar74/following{/other_user}","gists_url":"https://api.github.com/users/josegar74/gists{/gist_id}","starred_url":"https://api.github.com/users/josegar74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josegar74/subscriptions","organizations_url":"https://api.github.com/users/josegar74/orgs","repos_url":"https://api.github.com/users/josegar74/repos","events_url":"https://api.github.com/users/josegar74/events{/privacy}","received_events_url":"https://api.github.com/users/josegar74/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T12:19:59Z","updated_at":"2016-05-25T12:19:59Z","body":"I have tried to setup `singleTile: true` in the `mapOptions`, but no success.\r\n\r\nAbout the reason to use WMS, is to use 4326 projection so can use the map current extent coordinates for filtering metadata that is georeferenced in this projection. Not sure if the ESRI REST service provides support for 4326 projection?"}}
{"actor":{"display_login":"josegar74"}}