Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full Screen Google Map

How can I use Google Maps API to show me a full screen map with no sidebars or search bar? I just need it to show a specific location in a mobile app, users don't need to search. Is this possible?

Also if I provide a street address how can it put a push-pin at the location?

like image 706
Yazzmi Avatar asked Jul 29 '10 06:07

Yazzmi


People also ask

How do I make Google Maps full screen on IPAD?

Google notes that the new full-screen mode can be activated by “tapping an empty spot on the map,” while improved voice search brings the ability to “type, or tap the mic and say, “directions to” a place for faster results.”

How do I make Street View full screen?

Go full screenHit CTRL-Shift and F on a PC or CMD-Shift and F on a Mac. Google Street View should fill your monitor at the maximum possible size — and if you've followed the instructions above there'll be no buttons, overlays or widgets either. Scooch the cursor over to the side of the screen and take your screenshot.

How do I turn on full screen option?

The quickest way to get Chrome in full-screen mode in Windows is to press F11 on the keyboard.


1 Answers

Assuming you are planning to use the v3 API, you may want to check the following section of the documentation:

  • Developing for Mobile Devices (iPhone and Android device)

As for your second question, you can use Geocoding. Consider the following simple example:

<!DOCTYPE html>
<html> 
<head> 
   <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
   <title>Google Maps Geocoding Demo</title> 
   <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
   <script src="http://maps.google.com/maps/api/js?sensor=false" 
           type="text/javascript"></script> 
   <style type="text/css">
     html { height: 100% }
     body { height: 100%; margin: 0px; padding: 0px }
     #map { height: 100% }
   </style>
</head> 
<body> 
   <div id="map"></div> 

   <script type="text/javascript"> 

   var address = 'Oxford Street, London, UK';

   var map = new google.maps.Map(document.getElementById('map'), { 
       mapTypeId: google.maps.MapTypeId.TERRAIN,
       zoom: 12
   });

   var geocoder = new google.maps.Geocoder();

   geocoder.geocode({
      'address': address
   }, 
   function(results, status) {
      if(status == google.maps.GeocoderStatus.OK) {
         new google.maps.Marker({
            position: results[0].geometry.location,
            map: map
         });
         map.setCenter(results[0].geometry.location);
      }
      else {
         // Google couldn't geocode this request. Handle appropriately.
      }
   });

   </script> 
</body> 
</html>

Screenshot:

Full Screen Google Map

like image 107
Daniel Vassallo Avatar answered Sep 28 '22 00:09

Daniel Vassallo