I am writing a webkit app, and i'm using google maps api v3. I tried it on a android phone (HTC Desire) but it dosen't pinch to zoom. Note, i don't want to pinch and zoom a web page I want to pinch to zoom a google map v3 map in a web view. Has anyone got this working on android?
It would appear that, currently, you cannot rely on being able to receive pinch-to-zoom events on Android browsers. Here it is in the Android issue tracker: http://code.google.com/p/android/issues/detail?id=11909
works in tablet 3.2 - Amazing pinch to zoom on a map works ! just like ipad. Who would have thought that a new version of android would fix an issue - rather than creating another bug - requiring yet another work around. Android i rate your version control 2 stars out of 5 up from 1 well done..well ...better get back to fixing the incompatibilities in my other apps!
Related
I recently started programming with cordova (using eclipse) for a Google map multiplatform app.
Currently, I am only working on android builds.
The app works well on Android with API 28, it shows a yellow flash screen with blue words then the google maps, makes a call to retrieve some data from my data base and shows it on the map. There is also a lateral black menu bar (working on that content).
But, if I try to execute this app on an Android 7.0 (API 24) or basically any other API lower than 28. The flash screen is completely white with blue words instead of yellow and the Google maps doesn't load (the side black menu does).
I have done some debugging to that and the app still does the call to my data base and retrieves the information. It doesn't show any error (it showed some but I corrected them and didn't solve this issue).
Does anyone have any idea what the problem might be?
Thanks a lot to all of you.
EDIT:
Here is the code and some new logs i got after trying to solve the problem.
https://www.dropbox.com/s/lm8fbsk6v97frq3/www.rar?dl=0
in the map API inicialization i had to take out the our API key since i am not allowed to share it.
Thanks for your interest with my problem. Ask me anything.
I just ran your app on a Nexus S Android 7.0 (API 24) emulator and indeed, your map did not show up at all.
I changed its height from 100% to a fixed size such as height:400px and then it loaded without issues. Switching back to height:100% and then adding position:absolute also worked, and so did wrapping the map in a containing <div> with a given height.
The thing is, a Google map needs to have an explicit height set in order to be displayed at all, but your map and body both do have a height, so upon further code inspection I noticed you're using jquery mobile which has its own CSS. I removed both your jquery mobile's JS and CSS scripts and voila! The map's right there. :)
Check the google play version of your emulator to see if its compatible. On my emulator, and old version of the google maps API would not register or load unless I had fully updated the play store. This could be fixed by downgrading the version of the google maps API you are currently using to a previous version.
I'm using Google Maps in a HTML5, jQuery Mobile based mobile site. The problem is that in Chrome the map isn't interactive, i.e not behaving as expected: Pinching, paning or any gestures simply does not work. The map more or less behaves as a picture, if I pinch it the browser eventually zooms in the entire site. Weirdly, if I manage to hit the top left +/- buttons on the map, it zooms as expected - albeit a bit slow / choppy.
Worth mentioning is that I'm using several map markers as well as a function that sets the zoom of the map to the markers bound. This is by the way "rendered" correctly in all tested browsers.
I've tested the site in several desktop browsers (including Chrome), all working correctly. As for mobile browsers I've tested Android Browser, Opera Mobile, Safari and finally Chrome Mobile. The map error occurs in both Android and IOS versions of Chrome.
Seeing that it works in the majority of mobile browsers and that Chrome is the newcomer of the bunch, I'm wondering if anyone else has seen this behavior? Hoping that may be the case I'm not attaching any code for now. However, if someone think this might be caused by an error in the code, I'll gladly edit it in.
So gestureHandling: 'greedy' !!!
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 14,
styles: styleArray,
center: myLatLng,
gestureHandling: 'greedy'
});
Since I only have a restriction on V3 in my api registration:
The solution defaults to the latested. Today Google Maps API was updated to version 3.8. Now my marker touch sensitivity on my iPAD 2 is a lot less sensitive. I have to be exact before it recognizes the custom marker touched that has draggable:true.
When I set the library to V3.7 all is fine.
Is there something that I need to change in V3.8 to relax the sensitivity of marker objects to touch recognition?
This problem is also in V3.9. It happens when the draggable=true is set on a marker. It happens in iOS 5.1 and Android 3.2
See related post in Bugs.
Complete beginner here so forgive me.
Porting an iOS App over to Android. We have custom image tiles laid over google maps. On iOS the streetmap displays as usual outside of our custom image tiles however on the Android version it is only showing a blank grid and we can't figure it out. The location works however it's just not showing the map.
We've tried a couple of different devices and the issue is the same across the board.
Any suggestions? If there is more info that I can provide that might help narrow the issue down, just ask.
EDIT: The device we are testing it on is a HTC. Apparently it works on a Nexus. Known compatibility issue?
If your MapView is not loading standard map tiles, either:
you do not have the INTERNET permission, or
you do not have an Internet connection, or
you are not using the right Maps API key for the signing key
Anyone know what might be going on with the Google Maps V3 on HDPI Android devices? When the map loads on my device it zooms to the appropriate level when first loading, but then pops out of the zoom to a much smaller zoom level1. I have changed no code, but this change happened in the last couple days. I found documentation regarding display of Google Static Maps on HDPI devices and am hoping someone can point me in the right direction to correct this issue using v3.
Here are screen shots to show initial and then final:
This may be a problem with the latest nightly release of the Maps API. Try specifying v=3.5 when you load the API.