Closed utpaul closed 5 years ago
I can see the same thing, my sample project is updated
https://github.com/battika/ionic-gmaps-test
Press the Add marker button on the bottom and try dragging the green marker. It drags the entire map, not the marker.
It works as expected on browser platform.
@battika you are right . Need to fix this . If possible then you resolve it
Sorry I don't really know the reason, just provided a sample for further investigation.
I have no problem at all.
ping
Can you share your code @wf9a5m75
I just run @battika's code
I guess it will another emulator issue. Masashi, I assume you tested it on a real device.
<plugin name="cordova-plugin-googlemaps" spec="2.5.1">
<variable name="API_KEY_FOR_ANDROID" value="key" />
<variable name="API_KEY_FOR_IOS" value="key" />
<variable name="PLAY_SERVICES_VERSION" value="15.0.1" />
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<engine name="android" spec="7.1.4" />
and "@ionic-native/google-maps": "^4.21.0" draggable not work
this.map.one(GoogleMapsEvent.MAP_READY).then(() => {
this.mapReady = true;
this.map.addMarker({
title: 'Ionic',
icon: 'blue',
animation: 'DROP',
draggable:true,
position: {
lat: CAMERA_DEFAULT_LAT,
lng: CAMERA_DEFAULT_LONG
}
}).then((marker:Marker)=>{
marker.showInfoWindow();
marker.on(GoogleMapsEvent.MARKER_CLICK).subscribe(() => {
alert('clicked');
});
marker.addEventListener(GoogleMapsEvent.MAP_DRAG).subscribe((event)=>{
alert('drag');
})
})
});
His project uses the same conditions with you.
https://github.com/battika/ionic-gmaps-test/blob/master/package.json
Please share your project files on GitHub repository. Otherwise we can not help you further ( in that case , I will close this thread).
repo link https://github.com/utpaul/google-maps-test
i'm testing on nokia 6 version pie
Android 9 (API level 28) on Emulator
i already check it my pie 9 on real device but not work ... please check it on real device
I did test your code and @battika's code a lot on both emulator and real device.
I didn't change the code of the property around recently. If it's real bug, I should receive more craimes. However only you. Thus, I don't think this is a bug.
I don't want to waste my private time furthermore for you. At least you should test another device.
tnx @wf9a5m75 for giving us such a valuable time.
I'm using ionic 3 apps. But marker draggable is not working.