{"action":"closed","issue":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/1858","repository_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps","labels_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/1858/labels{/name}","comments_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/1858/comments","events_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/1858/events","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1858","id":270706721,"number":1858,"title":"Creating Marker with opacity 0","user":{"login":"TGMorais","id":759052,"avatar_url":"https://avatars1.githubusercontent.com/u/759052?v=4","gravatar_id":"","url":"https://api.github.com/users/TGMorais","html_url":"https://github.com/TGMorais","followers_url":"https://api.github.com/users/TGMorais/followers","following_url":"https://api.github.com/users/TGMorais/following{/other_user}","gists_url":"https://api.github.com/users/TGMorais/gists{/gist_id}","starred_url":"https://api.github.com/users/TGMorais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TGMorais/subscriptions","organizations_url":"https://api.github.com/users/TGMorais/orgs","repos_url":"https://api.github.com/users/TGMorais/repos","events_url":"https://api.github.com/users/TGMorais/events{/privacy}","received_events_url":"https://api.github.com/users/TGMorais/received_events","type":"User","site_admin":false},"labels":[{"id":99999663,"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/labels/pending%20/%20waiting","name":"pending / waiting","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-11-02T15:53:48Z","updated_at":"2017-11-02T18:09:02Z","closed_at":"2017-11-02T18:09:02Z","author_association":"NONE","body":"Hello,\r\n\r\nThank you for work on this plugin, it really came in handy!\r\nI ran into a very small issue, while trying to create a marker with opacity set to `0`.\r\n\r\n**I'm submitting a ...**\r\n[ ] question\r\n[x] any problem or bug report\r\n[ ] feature request\r\n\r\n**The plugin version:**\r\n[x] 2.1.0 (github)\r\n[] 2.0 (npm)\r\n\r\n**If you choose 'problem or bug report', please select OS:**\r\n[x] Android\r\n[x] iOS\r\n\r\n**Cordova plugin list**\r\n```bash\r\ncom.googlemaps.ios 2.4.0 \"Google Maps SDK for iOS\"\r\ncordova-plugin-console 1.1.0 \"Console\"\r\ncordova-plugin-datepicker 0.9.3 \"DatePicker\"\r\ncordova-plugin-device 1.1.6 \"Device\"\r\ncordova-plugin-googlemaps 2.1.0-beta-20171031-1849 \"cordova-plugin-googlemaps\"\r\ncordova-plugin-ionic-webview 1.1.16 \"cordova-plugin-ionic-webview\"\r\ncordova-plugin-splashscreen 4.0.3 \"Splashscreen\"\r\ncordova-plugin-statusbar 2.2.3 \"StatusBar\"\r\ncordova-plugin-whitelist 1.3.2 \"Whitelist\"\r\nionic-plugin-keyboard 2.2.1 \"Keyboard\"\r\nphonegap-plugin-push 2.1.0 \"PushPlugin\"\r\n```\r\n\r\n**Current behavior:**\r\nCreating a new marker on the map with opacity set to `0` still adds it with opacity `1`\r\n\r\n**Expected behavior:**\r\nMarker opacity should be `0`\r\n\r\n\r\n**Steps to reproduce**\r\n```javascript\r\n//...\r\nconst marker = {\r\n   position: { lat: 51.458554, lng: -0.30211 },\r\n   opacity: 0, //this is not working\r\n};\r\nmap.addMarker(marker);\r\n//...\r\n\r\n```\r\n---\r\nWhen doing this, opacity is always `1` and I believe the reason why is because of this line:\r\nhttps://github.com/mapsplugin/cordova-plugin-googlemaps/blob/921b961da04a21fc3407829d01c95c75a9563769/www/Common.js#L581\r\n\r\nThis will evaluate to `1` when `markerOptions.opacity` is `0`.\r\nI worked around this by setting the opacity to something very low, like `0.001`.\r\n\r\nI can submit a pull request, if you like.\r\n\r\nCheers!"}}
{"actor":{"display_login":"wf9a5m75"}}