I'm currently developing a web application that involves the integration of Google Maps. The idea is to have a desktop version displaying a map with markers for each listed object, but I want to avoid showing the map on smaller devices like iPhones. This can be achieved by using CSS to hide the map element with a media query like this...
@media only screen and (max-width:800px){
#map{display:none}
}
However, I'm also looking for a way to prevent the data from loading if the screen size is too small to display it. Is there a way to achieve this using a combination of Javascript and CSS?