{"action":"created","issue":{"url":"https://api.github.com/repos/tomchadwin/qgis2web/issues/696","repository_url":"https://api.github.com/repos/tomchadwin/qgis2web","labels_url":"https://api.github.com/repos/tomchadwin/qgis2web/issues/696/labels{/name}","comments_url":"https://api.github.com/repos/tomchadwin/qgis2web/issues/696/comments","events_url":"https://api.github.com/repos/tomchadwin/qgis2web/issues/696/events","html_url":"https://github.com/tomchadwin/qgis2web/issues/696","id":377796186,"node_id":"MDU6SXNzdWUzNzc3OTYxODY=","number":696,"title":"measurement tool - openlayers 5","user":{"login":"dtvkoe","id":20685660,"node_id":"MDQ6VXNlcjIwNjg1NjYw","avatar_url":"https://avatars3.githubusercontent.com/u/20685660?v=4","gravatar_id":"","url":"https://api.github.com/users/dtvkoe","html_url":"https://github.com/dtvkoe","followers_url":"https://api.github.com/users/dtvkoe/followers","following_url":"https://api.github.com/users/dtvkoe/following{/other_user}","gists_url":"https://api.github.com/users/dtvkoe/gists{/gist_id}","starred_url":"https://api.github.com/users/dtvkoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtvkoe/subscriptions","organizations_url":"https://api.github.com/users/dtvkoe/orgs","repos_url":"https://api.github.com/users/dtvkoe/repos","events_url":"https://api.github.com/users/dtvkoe/events{/privacy}","received_events_url":"https://api.github.com/users/dtvkoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-06T11:03:41Z","updated_at":"2018-11-06T11:06:54Z","closed_at":null,"author_association":"NONE","body":"The measurement tool is not working anymore after upgrade of qgis2web to ol5.\r\n\r\nIf the measurement tool is embeeded there is one javascript exception right after the page has been loaded.\r\n\r\n`11:32:41.629 qgis2web.js:571 Uncaught TypeError: ol.Sphere is not a constructor\r\n    at qgis2web.js:571`\r\n\r\nWhen using the tool to measure a distance other exceptions occurre like \r\n`Uncaught TypeError: Cannot read property 'setMap' of undefined\r\n    at t.<anonymous> (PluggableMap.js:431)\r\n    at t.h (events.js:41)\r\n    at t.e.dispatchEvent (Target.js:95)\r\n    at t.insertAt (Collection.js:178)\r\n    at t.push (Collection.js:203)\r\n    at t.addInteraction (PluggableMap.js:486)\r\n    at HTMLButtonElement.handleMeasure (qgis2web.js:14)`\r\n\r\nor \r\n`Uncaught TypeError: Cannot read property 'getActive' of undefined\r\n    at t.handleMapBrowserEvent (PluggableMap.js:919)\r\n    at t.h (events.js:41)\r\n    at t.e.dispatchEvent (Target.js:95)\r\n    at t.relayEvent_ (MapBrowserEventHandler.js:280)\r\n    at t.h (events.js:41)\r\n    at t.e.dispatchEvent (Target.js:95)\r\n    at t.fireNativeEvent (PointerEventHandler.js:393)\r\n    at t.bo (NativeSource.js:54)\r\n    at t.eventHandler_ (PointerEventHandler.js:199)\r\n    at HTMLDivElement.h (events.js:41)`\r\n\r\nI'm using version 3.3.1 of qgis2web. The problem occurs with Firefox as browser as well while using Chrome.\r\n\r\n\"ol.Sphere\" is not available anymore in ol5.\r\nAn example how to update this function to ol5 can be found at: [https://github.com/Viglino/ol-ext/commit/8fe593e5a7e814f43d954cf6078429cfce941b9f#diff-3cce39e052bcb5bd5955f32dbe81c470](https://github.com/Viglino/ol-ext/commit/8fe593e5a7e814f43d954cf6078429cfce941b9f#diff-3cce39e052bcb5bd5955f32dbe81c470)\r\n"},"comment":{"url":"https://api.github.com/repos/tomchadwin/qgis2web/issues/comments/436215778","html_url":"https://github.com/tomchadwin/qgis2web/issues/696#issuecomment-436215778","issue_url":"https://api.github.com/repos/tomchadwin/qgis2web/issues/696","id":436215778,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjIxNTc3OA==","user":{"login":"tomchadwin","id":7840213,"node_id":"MDQ6VXNlcjc4NDAyMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/7840213?v=4","gravatar_id":"","url":"https://api.github.com/users/tomchadwin","html_url":"https://github.com/tomchadwin","followers_url":"https://api.github.com/users/tomchadwin/followers","following_url":"https://api.github.com/users/tomchadwin/following{/other_user}","gists_url":"https://api.github.com/users/tomchadwin/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchadwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchadwin/subscriptions","organizations_url":"https://api.github.com/users/tomchadwin/orgs","repos_url":"https://api.github.com/users/tomchadwin/repos","events_url":"https://api.github.com/users/tomchadwin/events{/privacy}","received_events_url":"https://api.github.com/users/tomchadwin/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T11:06:54Z","updated_at":"2018-11-06T11:06:54Z","author_association":"OWNER","body":"Confirmed, I think..."}}
{"actor":{"display_login":"tomchadwin"}}