简体   繁体   中英

How to zoom google map in high density android devices in hybrid mobile app using google map javascript API?

  • This is my first hybrid app.
  • I am targeting android(ver. 4 +) and iOS(ver. 7+) platform.
  • I am developing on windows platform.
  • I am using phonegap build.

I have developed a hybrid mobile application on apache cordova. I am implementing map feature in it using google map javascript API. I am facing an issue on high density devices such as xhdpi and xxhdpi where map font and other imaged are shrunk. when I increase zoom to 200% of div of map, the marker becomes non-clickable.

Please help me to optimize view of map in xhdpi and xxhdpi android devices.

In Android xhdpi devices devices : (Map is not clearly visible)

在此处输入图片说明

In Android devices where map div zoom = 200% (Map Marker click is not working in this case)

在此处输入图片说明

*Note : The same code is working fine on iOS devices as I think iOS is scaling it by itself.

You can control the scaledSize property for the icon. Check this link reference#Icon

The is resolved now by using viewport property and media query. Just use initial scale property for respective high density devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM