joggink / mobileGmap

Responsive google maps
99 stars 36 forks source link

Change mobile/screen size detection method? #6

Open tricki opened 11 years ago

tricki commented 11 years ago

On my Galaxy Nexus screen.width is 720 while $(window).width() is only 320 so the default screen.width breakpoint of 480 is not triggered.

I'm a bit unsure about the difference of screen.width (device-width) and $(window).width() and their values in different devices and which one of those fits best here. Do you have a specific reason for using screen.width to detect mobile users?

joggink commented 11 years ago

When using $(window).width on desktop I can't really tell the width of the device. Although CSS also uses the window width I don't want to switch back and forth between the google maps image and the interactive map on desktop because the main reason to use an image is for the scroll of death when users don't have a mouse or any other input device to scroll up / down.

*Sorry for the late reply but I was on a holiday