{"action":"created","issue":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2514","repository_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps","labels_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2514/labels{/name}","comments_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2514/comments","events_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2514/events","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2514","id":386077633,"node_id":"MDU6SXNzdWUzODYwNzc2MzM=","number":2514,"title":"ionic 4 map working in browser but not in device ","user":{"login":"Deliph13","id":38494425,"node_id":"MDQ6VXNlcjM4NDk0NDI1","avatar_url":"https://avatars2.githubusercontent.com/u/38494425?v=4","gravatar_id":"","url":"https://api.github.com/users/Deliph13","html_url":"https://github.com/Deliph13","followers_url":"https://api.github.com/users/Deliph13/followers","following_url":"https://api.github.com/users/Deliph13/following{/other_user}","gists_url":"https://api.github.com/users/Deliph13/gists{/gist_id}","starred_url":"https://api.github.com/users/Deliph13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deliph13/subscriptions","organizations_url":"https://api.github.com/users/Deliph13/orgs","repos_url":"https://api.github.com/users/Deliph13/repos","events_url":"https://api.github.com/users/Deliph13/events{/privacy}","received_events_url":"https://api.github.com/users/Deliph13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-30T08:00:38Z","updated_at":"2018-12-01T05:35:22Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nThank you for suggesting new feature.\r\nIf you have a good idea that helps other people a lot, please submit your idea.\r\n\r\nAlthough this plugin is open source, please consider to donation some amount, because \"time is money\".\r\nIf you ask a small feature, such as adding some options for an existing method, this project doesn't ask any donation.\r\nBut if you ask a big feature, such as adding \"directions\", \"streetview\",...etc, this project probably ask some amount donation.\r\n\r\nSo far, HTMLInfoWindow and MarkerCluster are the donated project.\r\n--->\r\n\r\n**Please tell us your new feature idea**\r\n\r\n**Why do you need it?**\r\n\r\n**How helps other people?**\r\n"},"comment":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/comments/443401610","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2514#issuecomment-443401610","issue_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2514","id":443401610,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQwMTYxMA==","user":{"login":"Deliph13","id":38494425,"node_id":"MDQ6VXNlcjM4NDk0NDI1","avatar_url":"https://avatars2.githubusercontent.com/u/38494425?v=4","gravatar_id":"","url":"https://api.github.com/users/Deliph13","html_url":"https://github.com/Deliph13","followers_url":"https://api.github.com/users/Deliph13/followers","following_url":"https://api.github.com/users/Deliph13/following{/other_user}","gists_url":"https://api.github.com/users/Deliph13/gists{/gist_id}","starred_url":"https://api.github.com/users/Deliph13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deliph13/subscriptions","organizations_url":"https://api.github.com/users/Deliph13/orgs","repos_url":"https://api.github.com/users/Deliph13/repos","events_url":"https://api.github.com/users/Deliph13/events{/privacy}","received_events_url":"https://api.github.com/users/Deliph13/received_events","type":"User","site_admin":false},"created_at":"2018-12-01T05:35:22Z","updated_at":"2018-12-01T05:35:22Z","author_association":"NONE","body":"> Without any hints, what would you do if you were I?\r\n```\r\nimport { Component, OnInit } from '@angular/core';\r\nimport {\r\n  ToastController,\r\n  Platform,\r\n  LoadingController\r\n} from '@ionic/angular';\r\nimport {\r\n  GoogleMaps,\r\n  GoogleMap,\r\n  GoogleMapsEvent,\r\n  Marker,\r\n  GoogleMapsAnimation,\r\n  MyLocation,\r\n  BaseArrayClass,\r\n  ILatLng\r\n} from '@ionic-native/google-maps';\r\n\r\n@Component({\r\n  selector: 'app-home',\r\n  templateUrl: 'home.page.html',\r\n  styleUrls: ['home.page.scss'],\r\n})\r\nexport class HomePage implements OnInit {\r\n\r\n  map: GoogleMap;\r\n\r\n  constructor(private platform: Platform) { }\r\n\r\n  async ngOnInit() {\r\n    // Since ngOnInit() is executed before `deviceready` event,\r\n    // you have to wait the event.\r\n    await this.platform.ready();\r\n    await this.loadMap();\r\n  }\r\n\r\n  loadMap() {\r\n    let POINTS: BaseArrayClass<any> = new BaseArrayClass<any>([\r\n      {\r\n        position: { lat: 41.79883, lng: 140.75675 },\r\n        iconData: \"./assets/imgs/Number-1-icon.png\"\r\n      },\r\n      {\r\n        position: { lat: 41.799240000000005, lng: 140.75875000000002 },\r\n        iconData: \"https://mapsplugin.github.io/ionic-googlemaps-quickdemo-v4/assets/imgs/Number-2-icon.png\"\r\n      },\r\n      {\r\n        position: { lat: 41.797650000000004, lng: 140.75905 },\r\n        iconData: {\r\n          url: \"https://mapsplugin.github.io/ionic-googlemaps-quickdemo-v4/assets/imgs/Number-3-icon.png\",\r\n          size: {\r\n            width: 24,\r\n            height: 24\r\n          }\r\n        }\r\n      },\r\n      {\r\n        position: { lat: 41.79637, lng: 140.76018000000002 },\r\n        title: \"4\",\r\n        iconData: \"blue\"\r\n      },\r\n      {\r\n        position: { lat: 41.79567, lng: 140.75845 },\r\n        title: \"5\",\r\n        iconData: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAACVUlEQVRIS8WWjVXCMBRGwwTqBMIEuAG4ARuIE6gTKBOgEyAT4AbABjKBMIE/C+h3m6S2pWlJ8BzfOTkpad6770teEzom3bZy/VbrpYTopDjJZ6w2c77X6p9j46SCUXvuYDxHq04BZ2rPHXa3y/DRqlPAmdqZW+hrkMZEq44F52q3oGTdrjEpqmPBudoxKVBVKqsU1THgPbW+klNUt4GHCn6idqEGuMveerUeXFGtNTCvah9qaz+n2gMmKMGBnLrfjPFcMirZ7231XUF19RUJkIhPZqXnT8AM9Osy62v0VPihUqIfjWwx1RkJvbxIpjArhabfbEJ6zQYwysiiT3CW8kJ6Q4BgqMALEnqVNAqQZGSkM/R7nMOBLhZ/B/ZQeg9V/1EsrpLy5dIqP8aAXV6WlQIlZrWq/wzeBK0DM3Y0vA0aAh8FPwTaBC7B2W8+qUOMT4l9dYUUrJK2k4tCOHl7O7zK+Xx69nbWU/iebgKz1+9E+OYPToR1fqOe+SquujeBWdzlYGBPohhjW9b2lGbRa72bwLdyml5d2auvaPyeTOzIw4MxzCkal8h8no3cqT3WJd0ExuFmOjXmlhRIXbnfKZQ7hfJ4HDTM8wVIMi6xJ01y3mV8E5glGlDRGIEKS75DrAtFn/0DA3x/b0ddZbPgGt23JnBW0agpKPzUGCvhoT4iv1HG9Zodtc6HGBTYnoXAXc3UR5SbBwK1d8y+8RUAzxNwU2orOwQeyolF/lLT7mUqQ8BqCj4Bt+j1lR0Cs3Sopt8GFLYNF/2JU7K2k6stePL7fwP/AER2xy+mY1/QAAAAAElFTkSuQmCC\"\r\n      }/*,\r\n      {\r\n        title: \"6\",\r\n        position: {lat:41.794470000000004, lng:140.75714000000002},\r\n        iconData: window.location.href.replace(/\\/([^\\/]+)$/, \"\") + \"/../images/number-6-icon.png\"\r\n      },\r\n      {\r\n        position: {lat:41.795010000000005, lng:140.75611},\r\n        iconData: \"cdvfile://\"   // The cdvfile:// protocol is acceptable.\r\n      },\r\n      {\r\n        position: {lat:41.79477000000001, lng:140.75484},\r\n        iconData: \"file://\"   // The file:// protocol is also acceptable.\r\n      },\r\n      {\r\n        position: {lat:41.79576, lng:140.75475},\r\n        iconData: \"/path/to/image/file\"  // Absolute path is also acceptable.\r\n      }\r\n      */\r\n    ]);\r\n\r\n    let bounds: ILatLng[] = POINTS.map((data: any, idx: number) => {\r\n      console.log(data);\r\n      return data.position;\r\n    });\r\n\r\n    this.map = GoogleMaps.create('map_canvas', {\r\n      camera: {\r\n        target: bounds\r\n      }\r\n    });\r\n    POINTS.forEach((data: any) => {\r\n      data.disableAutoPan = true;\r\n      let marker: Marker = this.map.addMarkerSync(data);\r\n      marker.on(GoogleMapsEvent.MARKER_CLICK).subscribe(this.onMarkerClick);\r\n      marker.on(GoogleMapsEvent.INFO_CLICK).subscribe(this.onMarkerClick);\r\n    });\r\n\r\n  }\r\n\r\n  onMarkerClick(params: any) {\r\n    let marker: Marker = <Marker>params[1];\r\n    let iconData: any = marker.get('iconData');\r\n    marker.setIcon(iconData);\r\n  }\r\n} \r\n```\r\nionic CLI 4.5.0\r\nNode: 10.14.1\r\nAngular CLI: 7.0.7\r\nOS: win32 x64\r\ntypescript 3.1.6\r\n\r\nthis runs perfect in browser but not in android"}}
{"actor":{"display_login":"Deliph13"}}