Google maps giving an error Exec proxy not found for :: GoogleMaps


#1


#2

instead of a screenshoot you should give us more details about your implementation of google maps and show us some code


#4

Sure,

in HTML file,
<div #map id="map" style="height:100%;"></div>

in .ts file

ngAfterViewInit() {
    this.loadMap();
  }

loadMap() {
      let element = document.getElementById('map');
      let map: GoogleMap = this.googleMaps.create(element, {});
      let latlng = new LatLng(23.2419048, 72.5656515);
      
      map.one(GoogleMapsEvent.MAP_READY).then(() => {
        let position: CameraPosition = {
        target: latlng,
        zoom: 10,
        tilt: 30
          }
          map.moveCamera(position);  
        let markeroptions: MarkerOptions = {
        position: latlng,
        title: 'The Bell'
      };
  
      let marker = map.addMarker(markeroptions).then((marker: Marker) => {
        marker.showInfoWindow();
      })
      })
   }

One other thing, i have setup API key correctly as this code is complete and it works on my other demo project which only includes maps.

Plugin is installed too as it can be seen in ionic plugin list command.

I don’t know why it doesn’t work in my other project.


#5

Hey are you running the application on a physical device?


#6

hi there,
Thanks for replying.
It doesn’t work on real device so i though to check it on browser.
and it was throwing that error.


#7

Well if you’re using the Google Maps Plugin it only works on physical Android and iOS devices.

Consider fixing the problem on android/ios or opening another thread to support your physical device errors.

Also you can use chrome to debbug physical android devices, by using the “chrome://inspect/#devices” features. And in Safari you can use the Develop tools to debbug apps on iOS devices.


#8

I think problem is that i am not getting getMap function on plugin.