<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1008731406451826004</id><updated>2025-10-17T09:08:12.410+01:00</updated><category term="Google Maps API V3"/><category term="Google Maps"/><category term="Info Window"/><category term="Markers"/><category term="Coordinates"/><category term="Geocoding"/><category term="Meus Mapas"/><category term="My Maps"/><category term="Panoramio"/><category term="Street View"/><category term="Views"/><title type='text'>Marnoto</title><subtitle type='html'>Sharing information on Google Maps JavaScript API v3.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://en.marnoto.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-8461770093746515150</id><published>2015-06-25T11:19:00.000+01:00</published><updated>2015-06-27T10:22:20.226+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Geocoding"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><title type='text'>Learning Google Maps Geocoding by example</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFWU2RN7xiV8Agr3gLz8A5M8wca2oHjNWd5Qs2yB3gk8Fd-rkdKpPyPv-nHaOmhp4sTAyMmtiRA6RhmiRlSVhOse_TWR9ZWmBDEq5y_My_Wu2r3lxiIR2mc1zG4kdqSNSu5t6djpss3TE/s1600/geocodingen2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFWU2RN7xiV8Agr3gLz8A5M8wca2oHjNWd5Qs2yB3gk8Fd-rkdKpPyPv-nHaOmhp4sTAyMmtiRA6RhmiRlSVhOse_TWR9ZWmBDEq5y_My_Wu2r3lxiIR2mc1zG4kdqSNSu5t6djpss3TE/s1600/geocodingen2.jpg&quot; alt=&quot;geocoding&quot; height=&quot;280&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;The Geocoding Service is an integrated process in the Google Maps JavaScript API v3 that allows you to convert an address in their respective geographic coordinates.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;The geocoder is included in the Google Maps JavaScript API v3 and so you don’t need to define any additional parameter in the API call URL. Since this service is already included in the API, there are no costs beyond the price applied to the basic API.&lt;br&gt;
However you should bear in mind that the geocoding process has usage limits.&lt;/p&gt;
&lt;h3&gt;Google Geocoder Service usage limits&lt;/h3&gt;
&lt;p&gt;After loading the API you can do some requests for geocoding (less than 10) but then the service is limited to little over one request per second. Beyond these limits the API sends an alert to the user. To prevent this warning to be visible by the user and if you need to make several consecutive requests to the geocoding service, you must program the call to setTimeout geocoder with more than 750 milliseconds.&lt;/p&gt;
&lt;h3&gt;Where you can use geocoding service&lt;/h3&gt;
&lt;p&gt;With the geocoder you can &lt;b&gt;add a marker&lt;/b&gt; on the map and &lt;b&gt;center the map&lt;/b&gt; in a predefined area.&lt;/p&gt;
&lt;p&gt;Imagine that you are creating a map to show the points of interest of your country. Through the geocoder you can allow the user to search by city or street, moving the map automatically to the desired area.&lt;/p&gt;
&lt;p class=&quot;bottom-short&quot;&gt;Similarly you can add a new marker on the map.&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;The user enters the desired address in a text box.&lt;/li&gt;
  &lt;li&gt;Using the geocoding service the address is converted to its geographical coordinates.&lt;/li&gt;
  &lt;li&gt;Automatically the map is centered on the desired area.&lt;/li&gt;
  &lt;li&gt;A new marker is added to the map.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The geocoding service can also be used to convert addresses in bulk. That is, you can convert various addresses in their respective geographic coordinates to include in a database. However this feature is beyond the scope of this guide.&lt;/p&gt;
&lt;p&gt;In this guide I will explain how to move the map to a particular region and how to add a marker at the desired location by specifying an address.&lt;/p&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/geocodingservice/example.html&quot; target=&quot;_blank&quot; title=&quot;Geocoding usage example&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/geocodingservice.zip&quot; title=&quot;geocodingservice.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;
The HTML structure needed for the application.&lt;/h3&gt;
&lt;p&gt;This example consists of a map, a text box and a button. The text box is used to get the address to search and the button starts the geocoder process.&lt;/p&gt;
&lt;p&gt;You must first prepare the HTML, CSS and JavaScript files with basic options &lt;a href=&quot;http://en.marnoto.com/2013/09/como-criar-um-mapa-com-google-maps-api.html&quot; target=&quot;_blank&quot; title=&quot;How to create a map with Google Maps API v3&quot;&gt;to include a map with Google Maps API on the web page&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;HTML /index.html&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-html&quot;&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;css/style.css&amp;quot;&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://maps.googleapis.com/maps/api/js?sensor=false&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;js/map.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt; 
    &amp;lt;div id=&amp;quot;map-canvas&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
html {
  height: 100%;
}
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#map-canvas {
   margin: 0;
   padding: 0;
   height: 400px;
   max-width: none;
}
#map-canvas img {
   max-width: none !important;
}
&lt;/pre&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
var map;
var marker;

function initialize() {
  var mapOptions = {
    center: new google.maps.LatLng(40.680898,-8.684059),
    zoom: 11,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById(&quot;map-canvas&quot;), mapOptions);
}
google.maps.event.addDomListener(window, &quot;load&quot;, initialize);
&lt;/pre&gt;
&lt;br&gt;
&lt;p&gt;Then include the &lt;b&gt;text box&lt;/b&gt; that will receive the address and a &lt;b&gt;button&lt;/b&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;HTML /index.html&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-html&quot;&gt;
...
  &amp;lt;body&amp;gt;
    &amp;lt;div&amp;gt;
       Indique um endere&amp;#231;o &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;address-input&amp;quot;&amp;gt;
       &amp;lt;button onclick=&amp;quot;searchAddress();&amp;quot;&amp;gt;Pesquisar&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;   
    &amp;lt;div id=&amp;quot;map-canvas&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Assuming you already have all the HTML elements prepared, let&#39;s proceed to the most important phase.&lt;/p&gt;
&lt;h3&gt;Starting Geocoder process&lt;/h3&gt;
&lt;p&gt;The Google Maps Geocoding Service runs with a call to &lt;b&gt;google.maps.Geocoder()&lt;/b&gt; method and it isn’t necessary to include any call on the API url. The Geocoder method is already included in the basic API.&lt;/p&gt;
&lt;p&gt;In this example I&#39;ll set the geocoding service in a specific function outside the function usually called &lt;i&gt;initialize()&lt;/i&gt;. I will designate this function as &lt;i&gt;searchAddress()&lt;/i&gt; but you can assign any other name.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

}
&lt;/pre&gt;
&lt;p&gt;Within the searchAddress() function you start to create a new variable that will get the text box value in which is indicated the address to convert.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

  var addressInput = document.getElementById(&#39;address-input&#39;).value;

}
&lt;/pre&gt;
&lt;p&gt;Then another variable is defined with the name &lt;b&gt;geocoder&lt;/b&gt; to start a new instance of google.maps.Geocoder() method.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

  var addressInput = document.getElementById(&#39;address-input&#39;).value;

  var geocoder = new google.maps.Geocoder();
}
&lt;/pre&gt;
&lt;p&gt;The Geocoder() has a method known as &lt;b&gt;geocode()&lt;/b&gt;. This is method that you will use to make the request for geocoding.&lt;/p&gt;
&lt;p&gt;This method accepts two parameters. In the first parameter, called GeocodeRequest, you&#39;re going to define an object with the property &lt;b&gt;address:&lt;/b&gt; whose value is equal to the value of the text box address-input stored in addressInput variable. &lt;b&gt;{address: addressInput}&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;In the second parameter you set a callback function that will process the results. &lt;b&gt;function(results, status) {&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

  var addressInput = document.getElementById(&#39;address-input&#39;).value;

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

  geocoder.geocode({address: addressInput}, function(results, status) {

  }
}
&lt;/pre&gt;
&lt;p&gt;The &lt;b&gt;GeocodeRequest&lt;/b&gt; object (first parameter) also accepts the property &lt;b&gt;{location: LatLng}&lt;/b&gt;. When you use the property &quot;location&quot; you will be indicating to the Geocoding Service that you want to get an address through LatLng coordinates. This process is known as &lt;b&gt;Reverse Geocoding&lt;/b&gt;. &lt;/p&gt;
&lt;p&gt;In this example you are sending the property &lt;b&gt;address&lt;/b&gt; and that&#39;s how the Google Maps geocoding service know what procedure to take. Which in this case is to convert an address in latitude and longitude coordinates.&lt;/p&gt;
&lt;p&gt;geocoder.geocode(&lt;b&gt;{address: addressInput}&lt;/b&gt;, ...&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;callback function&lt;/b&gt; defined in the second parameter also accepts two parameters. The first parameter &lt;b&gt;results&lt;/b&gt; receives the result or results may be more than one. With the second parameter &lt;b&gt;status&lt;/b&gt; is performed the check of the success of the geocoding service.&lt;/p&gt;
&lt;p&gt;If the geocoder was successful, then you can move on to the processing of information received through the parameter &lt;b&gt;results&lt;/b&gt;. If the geocoder was not successful, then procedes to check their causes. By the response obtained in the &lt;b&gt;status&lt;/b&gt; parameter you&#39;re going to try to solve the problem or you give a response to the user to take certain procedure.&lt;/p&gt;
&lt;p&gt;The first action to take is to check the returned status. &lt;b&gt;if (status == google.maps.GeocoderStatus.OK) {&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

  var addressInput = document.getElementById(&#39;address-input&#39;).value;

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

  geocoder.geocode({address: addressInput}, function(results, status) {

    if (status == google.maps.GeocoderStatus.OK) {

    }
  }
}
&lt;/pre&gt;
&lt;p&gt;If the value of the &lt;b&gt;status&lt;/b&gt; parameter is equal to &lt;b&gt;google.maps.GeocoderStatus.OK&lt;/b&gt; this means that the geocoding process was successful and returned one or more results. GeocoderStatus may return other values but for now you will believe that all is well and you can continue processing the information received.&lt;/p&gt;
&lt;p&gt;Since the geocoder may return one or more results, the variable &lt;b&gt;results is of type array&lt;/b&gt;. But believing that the geocode service hit the result that you want, then you will be working with the result of the first index &lt;b&gt;results[0]&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;The information returned by the geocoder contains an object called &lt;i&gt;GeocoderResults&lt;/i&gt;. One of the properties of this object is another object named &lt;b&gt;geometry&lt;/b&gt;. One of the geometry object properties is &lt;b&gt;location&lt;/b&gt; and its value is &lt;b&gt;LatLng&lt;/b&gt;.
So, you can set the result as follows:
  &lt;b&gt;results[0]: {
    geometry: {
      location: LatLng
    }
  }&lt;/b&gt;
  &lt;br&gt;That is, to get LatLng coordinates just do this: &lt;b&gt;results[0].geometry.location&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The value received is a google.maps.LatLng object. Just enter this value directly in the process you want to use. In this case you will center the map on the location received by geocode, with &lt;b&gt;map.setCenter(results[0].geometry.location)&lt;/b&gt; function and you give the latlng object as the only parameter.&lt;/p&gt;
&lt;p&gt;Additionally you can reset the zoom value to reposition the map and highlight the desired area.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

  var addressInput = document.getElementById(&#39;address-input&#39;).value;

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

  geocoder.geocode({address: addressInput}, function(results, status) {

    if (status == google.maps.GeocoderStatus.OK) {

      map.setCenter(results[0].geometry.location);

      map.setZoom(17);
    }
  }
}
&lt;/pre&gt;
&lt;h3&gt;Adding a marker with Google Maps Geocoder&lt;/h3&gt;
&lt;p&gt;Adding a marker into the map with the Google Maps Geocoding Service v3 by specifying an address is performed in the same way described above. However, it is necessary to set &lt;a href=&quot;http://en.marnoto.com/2013/09/adicionar-um-marcador-com-google-maps.html&quot; target=&quot;_blank&quot; title=&quot;Add a marker with Google Maps JavaScript API v3&quot;&gt;the function that creates the marker&lt;/a&gt; and additionally you can center the map on the marker position and zoom it. Following the example above:&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function searchAddress() {

  var addressInput = document.getElementById(&#39;address-input&#39;).value;

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

  geocoder.geocode({address: addressInput}, function(results, status) {

    if (status == google.maps.GeocoderStatus.OK) {

      var myResult = results[0].geometry.location; // reference LatLng value

      createMarker(myResult); // call the function that adds the marker

      map.setCenter(myResult);

      map.setZoom(17);

    }
  });
}

function createMarker(latlng) {

   // If the user makes another search you must clear the marker variable
   if(marker != undefined &amp;&amp; marker != &#39;&#39;){
    marker.setMap(null);
    marker = &#39;&#39;;
   }

   marker = new google.maps.Marker({
      map: map,
      position: latlng
   });

}
&lt;/pre&gt;
&lt;h3&gt;If the geocode was not successful&lt;/h3&gt;
&lt;p&gt;If the geocode was not successful, the function returns a warning message with the error message returned by the parameter &lt;b&gt;status&lt;/b&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JS /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
...

  if (status == google.maps.GeocoderStatus.OK) {

    var myResult = results[0].geometry.location; // reference LatLng value

    createMarker(myResult); // call the function that adds the marker

    map.setCenter(myResult);

    map.setZoom(17);

  } else { // if status value is not equal to &quot;google.maps.GeocoderStatus.OK&quot;

    // warning message
    alert(&quot;The Geocode was not successful for the following reason: &quot; + status);

  }

...
&lt;/pre&gt;
&lt;p&gt;The code shown in this guide is the minimum required to include the geocoding service in an application. From here you can move on to learning the possible responses of the properties &lt;b&gt;status&lt;/b&gt; and &lt;b&gt;results&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;linkExemplos&quot;&gt;&lt;a class=&quot;btndemo&quot; href=&quot;http://maps.marnoto.com/en/geocodingservice/example.html&quot; target=&quot;_blank&quot;&gt;Map example.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Was this article helpful?&lt;br&gt;Do you shave any doubts or want to share some knowledge?&lt;br&gt;Use the comments box and let me know. You’re welcome!&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;

&lt;div class=&quot;download-files&quot;&gt;
  &lt;div class=&quot;download-files-title&quot;&gt;Download the necessary files for this example&lt;/div&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/geocodingservice.zip&quot;&gt;geocodingservice.zip&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/8461770093746515150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2015/06/aprende-google-maps-geocoding-exemplos.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/8461770093746515150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/8461770093746515150'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2015/06/aprende-google-maps-geocoding-exemplos.html' title='Learning Google Maps Geocoding by example'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFWU2RN7xiV8Agr3gLz8A5M8wca2oHjNWd5Qs2yB3gk8Fd-rkdKpPyPv-nHaOmhp4sTAyMmtiRA6RhmiRlSVhOse_TWR9ZWmBDEq5y_My_Wu2r3lxiIR2mc1zG4kdqSNSu5t6djpss3TE/s72-c/geocodingen2.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-7377399929918489629</id><published>2015-02-08T21:49:00.000+00:00</published><updated>2018-03-30T10:02:49.405+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Markers"/><title type='text'>Quick and easy share a location on Google Maps</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNSNwOztzP1pBSX0bTOQFrSxT46Cyy4sJ5h-3ZQfd0uCSGzGsDyxbZpTxbCEN5TzFbIeHjwCRVAmEGqR0CquLUD3Npz0ufZIhBF48HxpiGHuR5zYxCYma2RX6gTHGm_a2cr5Eg1bCfct4/s1600/mapsharing.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNSNwOztzP1pBSX0bTOQFrSxT46Cyy4sJ5h-3ZQfd0uCSGzGsDyxbZpTxbCEN5TzFbIeHjwCRVAmEGqR0CquLUD3Npz0ufZIhBF48HxpiGHuR5zYxCYma2RX6gTHGm_a2cr5Eg1bCfct4/s1600/mapsharing.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Sometimes sharing the restaurant location for your next dinner party is a very painful task. Not all group members live in the same city and to make things worse, the restaurant owner decided to choose that corner in the X alley because it&#39;s most quiet!&lt;br&gt;
This is a common situation and can be transported to other group activities. What is normal to do in this situation is to send the information by e-mail, or worse, is trying to describe the route via telephone. Both situations are potential attacks to the patience of any sane mind and can be avoided if you &lt;b&gt;share a location on Google Maps&lt;/b&gt;.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Besides solving the problem described above, sharing a map also offers other advantages. &lt;span itemprop=&quot;description&quot;&gt;The map can be viewed on a computer, tablet or mobile phone and can include route indications.&lt;/span&gt; You can also use this to link your business address, on your website, to Google Maps with a pin. This is a easy way to send your location from google maps.&lt;/p&gt;
&lt;h3&gt;How to share a location on Google Maps&lt;/h3&gt;
&lt;ol&gt;
   &lt;li&gt;Open &lt;a href=&quot;http://maps.google.com&quot; target=&quot;_blank&quot; title=&quot;Google Maps&quot; &gt;Google Maps&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;Make a search by address (e.g. Av 25 de Abril 122, Ílhavo).&lt;/li&gt;
   &lt;li&gt;Copy the URL in the address bar.&lt;/li&gt;
   &lt;li&gt;Send the link by email or post on your favorite social network.&lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
&lt;p&gt;Sharing a map with Google Maps is as simple as that. The link contains all the necessary information so that the other person can view exactly the same map.&lt;/p&gt;&lt;br&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0WyhP98Ftn7SzoZTxYzvSHRY1NjYDIHxUI0ty8rLZYhX-l-Epp5fNON9RKL3HhfJXjhMiMP1_GD2mvuTL9-tNUZPfhfZsp37-WO1i2UQAC9fcg7My-4L9DV6aOO7hR1_hz-hunL3Lllk/s1600/sharemap1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0WyhP98Ftn7SzoZTxYzvSHRY1NjYDIHxUI0ty8rLZYhX-l-Epp5fNON9RKL3HhfJXjhMiMP1_GD2mvuTL9-tNUZPfhfZsp37-WO1i2UQAC9fcg7My-4L9DV6aOO7hR1_hz-hunL3Lllk/s1600/sharemap1.gif&quot; alt=&quot;Google Maps&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;This way of sharing a map is simple, easy and fast. If Google Maps found the site, then it will place a marker on the map and Street View is automatically framed at the desired location.&lt;/p&gt;&lt;br&gt;
&lt;h3&gt;Include a marker on the map when Google Maps can&#39;t find the desired address&lt;/h3&gt;
&lt;ol&gt;
   &lt;li&gt;Open &lt;a href=&quot;http://maps.google.com&quot; target=&quot;_blank&quot; title=&quot;Google Maps&quot; &gt;Google Maps&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;Zoom to the desired location.&lt;/li&gt;
   &lt;li&gt;Click with the left mouse button at the desired location.&lt;/li&gt;
   &lt;li&gt;Click on the latitude and longitude coordinates that appear in the search box on the left side of the map. &lt;b&gt;This click places a marker on the map.&lt;/b&gt;&lt;/li&gt;
   &lt;li&gt;Copy the link from the URL address bar or choose the option &quot;short link&quot;, as described below, and share it.&lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNYp3EJUWrbGdZZIkJcBToHtiUnr54nj7O_due4frYIg6Yeky-xyI90d8m8v5tuhlUG0BmmpOPiOZS-XvvRUjLSof3fldYkOJ_qGfouseXrlLdabf808fqqmVpeutPm_eb0oQliT0KzM8/s1600/sharemap2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNYp3EJUWrbGdZZIkJcBToHtiUnr54nj7O_due4frYIg6Yeky-xyI90d8m8v5tuhlUG0BmmpOPiOZS-XvvRUjLSof3fldYkOJ_qGfouseXrlLdabf808fqqmVpeutPm_eb0oQliT0KzM8/s1600/sharemap2.gif&quot; alt=&quot;Google Maps&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;The share link&lt;/h3&gt;
&lt;p&gt;Copying the link from the URL address bar has the advantage of being fast but there is another way to find that link.
&lt;ol&gt;
   &lt;li&gt;Once you&#39;ve found the desired location, click the &lt;b&gt;gear wheel &lt;i class=&quot;fa fa-gear&quot;&gt;&lt;/i&gt;&lt;/b&gt; in the lower right corner.&lt;/li&gt;
   &lt;li&gt;Choose &lt;b&gt;“Share or embed map”&lt;/b&gt; option.&lt;/li&gt;
   &lt;li&gt;You will see a small window with the link to share. This link is equal to that in the URL address bar, so it has no great advantage to copy the link this way. The advantage is that you can shorten the URL with &lt;b&gt;“Short URL”&lt;/b&gt; option.&lt;/li&gt;
   &lt;li&gt;Copy the short link and share it.&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgue0ZfDFwKGalKXOaLGJDZugLYVcH9pqrTqB_NxR2XXOPJwYHXRT7Qq6SPP2JX3KBpsrt__QfFpTJQMNlE61Vv7tvCivjbcG_rAvL75_019_3sGKThDtBbWXPtiNNPqZG_zGuMuKJJgxw/s1600/sharemap3.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgue0ZfDFwKGalKXOaLGJDZugLYVcH9pqrTqB_NxR2XXOPJwYHXRT7Qq6SPP2JX3KBpsrt__QfFpTJQMNlE61Vv7tvCivjbcG_rAvL75_019_3sGKThDtBbWXPtiNNPqZG_zGuMuKJJgxw/s1600/sharemap3.gif&quot; alt=&quot;Google Maps&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;This option allows you to use the same link but much shorter. Thus the link address is not so strange and allows sharing where there is a character limit.&lt;/p&gt;
&lt;h3&gt;What can you share?&lt;/h3&gt;
&lt;ul&gt;
   &lt;li&gt;A road map &lt;i class=&quot;fa fa-angle-right&quot;&gt;&lt;/i&gt; &lt;a href=&quot;https://goo.gl/maps/GQdtl&quot; target=&quot;_blank&quot;&gt;https://goo.gl/maps/GQdtl&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;A map with satellite images, like Google Earth &lt;i class=&quot;fa fa-angle-right&quot;&gt;&lt;/i&gt; &lt;a href=&quot;https://goo.gl/maps/Yi862&quot; target=&quot;_blank&quot;&gt;https://goo.gl/maps/Yi862&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;A road map or satellite image with a marker (conforme explicado anteriormente) &lt;i class=&quot;fa fa-angle-right&quot;&gt;&lt;/i&gt; &lt;a href=&quot;https://goo.gl/maps/CPFEh&quot; target=&quot;_blank&quot;&gt;https://goo.gl/maps/CPFEh&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;A direct link to the location shown in Street View &lt;i class=&quot;fa fa-angle-right&quot;&gt;&lt;/i&gt; &lt;a href=&quot;https://goo.gl/maps/97FnC&quot; target=&quot;_blank&quot;&gt;https://goo.gl/maps/97FnC&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;A map with predefined directions from point of origin to the destination point &lt;i class=&quot;fa fa-angle-right&quot;&gt;&lt;/i&gt; &lt;a href=&quot;https://goo.gl/maps/qxdP0&quot; target=&quot;_blank&quot;&gt;https://goo.gl/maps/qxdP0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Any of these options is possible to share, all the necessary information is contained in the URL link. That is, if you want to share a Street View image, just go to Street View, compose the image in the position you want and share the URL. To share directions, click directions, choose the point of origin and the destination point and share the link.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;Was this article helpful?&lt;br&gt;Do you shave any doubts or want to share some knowledge?&lt;br&gt;Use the comments box and let me know. You’re welcome!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/7377399929918489629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2015/02/rapido-e-simples-partilhar-um-mapa.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/7377399929918489629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/7377399929918489629'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2015/02/rapido-e-simples-partilhar-um-mapa.html' title='Quick and easy share a location on Google Maps'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNSNwOztzP1pBSX0bTOQFrSxT46Cyy4sJ5h-3ZQfd0uCSGzGsDyxbZpTxbCEN5TzFbIeHjwCRVAmEGqR0CquLUD3Npz0ufZIhBF48HxpiGHuR5zYxCYma2RX6gTHGm_a2cr5Eg1bCfct4/s72-c/mapsharing.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-3511590087607376692</id><published>2014-09-25T19:31:00.000+01:00</published><updated>2015-06-26T10:20:31.744+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Panoramio"/><category scheme="http://www.blogger.com/atom/ns#" term="Views"/><title type='text'>Google will delete Panoramio</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj47qje8Rk1wKvUqwIAqGhqQiqc8dv7qB9qhNAwrAuTBQifhlAffZPaviM6yHMZuAaw79Xgl64ZKAsThaW35X94rtLds1TauxZrxhI7tMIdWTieJNY2vFGB5j39Y2b9n-zb0NVvI2j_YUU/s1600/panoramio.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj47qje8Rk1wKvUqwIAqGhqQiqc8dv7qB9qhNAwrAuTBQifhlAffZPaviM6yHMZuAaw79Xgl64ZKAsThaW35X94rtLds1TauxZrxhI7tMIdWTieJNY2vFGB5j39Y2b9n-zb0NVvI2j_YUU/s1600/panoramio.jpg&quot; alt=&quot;Panoramio&quot; height=&quot;194&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;On the same day that Google announced &lt;a href=&quot;http://en.marnoto.com/2014/09/google-my-maps-esta-de-volta.html&quot; target=&quot;_blank&quot;&gt;Google My Maps&lt;/a&gt; it was also announced the end of &lt;a href=&quot;http://www.panoramio.com&quot; target=&quot;_blank&quot;&gt;Panoramio&lt;/a&gt;. After 9 years feeding the Google Maps with georeferenced images from around the world, Panoramio will be replaced by &lt;a href=&quot;https://www.google.com/maps/views/home?gl=pt&quot; target=&quot;_blank&quot;&gt;Google Maps Views&lt;/a&gt;.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Since the launch of Google+ that Google wants all its products orbit around its social network. Views will be the new home of all the images on Panoramio.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj47qje8Rk1wKvUqwIAqGhqQiqc8dv7qB9qhNAwrAuTBQifhlAffZPaviM6yHMZuAaw79Xgl64ZKAsThaW35X94rtLds1TauxZrxhI7tMIdWTieJNY2vFGB5j39Y2b9n-zb0NVvI2j_YUU/s1600/panoramio.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj47qje8Rk1wKvUqwIAqGhqQiqc8dv7qB9qhNAwrAuTBQifhlAffZPaviM6yHMZuAaw79Xgl64ZKAsThaW35X94rtLds1TauxZrxhI7tMIdWTieJNY2vFGB5j39Y2b9n-zb0NVvI2j_YUU/s1600/panoramio.jpg&quot; alt=&quot;Panoramio&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;An unexpected announcement&lt;/h3&gt;
&lt;p&gt;This &lt;a href=&quot;https://groups.google.com/forum/m/#!topic/panoramio-questions-support/vTsUTaW_EDo&quot; target=&quot;_blank&quot;&gt;announcement was issued&lt;/a&gt; by googler Evan Rapoport in the help forum of Panoramio and &lt;a href=&quot;https://groups.google.com/forum/m/#!topic/panoramio-questions-support/R5toz0EAB8k&quot; target=&quot;_blank&quot;&gt;enhanced&lt;/a&gt; by Google Maps vice president, immediately generating a great controversy around the decision.&lt;/p&gt;
&lt;p&gt;One of the Panoramio users comments as follows: &lt;i&gt;“... Panoramio is a site where people from all countries of the world come together and make friends through the photos and comments… Panoramio promotes International Friendship and so is very important that the service will continue at any cost…”&lt;/i&gt;&lt;br /&gt;
In general this is the feeling of users who deeply feel disappointed with this decision of Google.&lt;/p&gt;
&lt;h3&gt;Disappointment&lt;/h3&gt;
&lt;p&gt;The problem is not so much in changing to another platform but in the separation of the community.
Google wants its users to transfer their images to Views, promising to transfer the view count for each image but what is left behind is the most important. &lt;b&gt;Google will not transfer the user comments&lt;/b&gt; and the Panoramio community was built thanks to those comments. Many users have created bonds of friendship, developed their photo-shooting skills and some married thanks to Panoramio!&lt;/p&gt;
&lt;h3&gt;Feeling of indignation&lt;/h3&gt;
&lt;p&gt;The feeling is anger and the voices were heard from the three Spanish, Joaquin Cuenca Abela, Jose Conde Florido and Eduardo Manchón Aguilar, who in October 2005 founded the Panoramio.com. The three founders created a &lt;a href=&quot;http://www.change.org/p/google-google-keep-the-panoramio-community-alive&quot; target=&quot;_blank&quot;&gt;petition&lt;/a&gt; asking the Google not to end up with the community. &lt;i&gt;“Since Google announced the end of Panoramio us, the founders of Panoramio, received hundreds of messages from users around the world who want to keep alive the Panoramio Community”&lt;/i&gt;. Thus begins the text of the petition that after 48 hours already has about 3,000 signatures.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKotPdRc9_vrk0-bZY3THXcLlEV88HxZuhUtYA0bNERN5eAoUw6A_sWXEwfKo1b24xv5av9EoLSNvt0SjQMsn2B1lX3d-CTCdENtC3ifQkbqPJRnT3utfByLMjTPb4fUpYQCgNTfQVyDc/s1600/panoramio_peticao.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKotPdRc9_vrk0-bZY3THXcLlEV88HxZuhUtYA0bNERN5eAoUw6A_sWXEwfKo1b24xv5av9EoLSNvt0SjQMsn2B1lX3d-CTCdENtC3ifQkbqPJRnT3utfByLMjTPb4fUpYQCgNTfQVyDc/s1600/panoramio_peticao.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;False hope?&lt;/h3&gt;
&lt;p&gt;I already signed that petition, because it is very important for those who belong to this community but this may be a false hope. The Googlers have demonstrated several times that they do not listen to the demands of its users. They also have shown that they have no sensitivity to social issues, community and privacy, as example the &lt;a href=&quot;http://en.wikipedia.org/wiki/Google_Buzz&quot; target=&quot;_blank&quot;&gt;Buzz disaster&lt;/a&gt;. Even more, the list of &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_Google_products#Discontinued_products_and_services&quot; target=&quot;_blank&quot;&gt;products closed&lt;/a&gt; by Google goes already long and the Panoramio.com is already part of it.&lt;/p&gt;
&lt;h3&gt;Until June 2015&lt;/h3&gt;
&lt;p&gt;Although Google has not determined the date for the “blackout” we can foresee that it’ll be close to June 2015. On June 4, 2014 an article was published in Geo Developers Blog to announce the &lt;a href=&quot;http://googlegeodevelopers.blogspot.pt/2014/06/sunsetting-javascript-api-weather-panoramio.html&quot; target=&quot;_blank&quot;&gt;end of the Weather JavaScript API and Panoramio&lt;/a&gt; for the next June 4, 2015.&lt;/p&gt;
&lt;h3&gt;The advantages and disadvantages&lt;/h3&gt;
&lt;p&gt;Google Maps Views is prepared for today&#39;s mobility needs, unlike the outdated structure of Panoramio, and promises to follow the same principles as its predecessor. 
However, the source of images that &quot;feeds&quot; Views and the new Google Maps is somehow dispersed.
That is, all existing georeferenced photos on Google+ or Picasa in publicly shared albums that respect Google&#39;s selection criteria and whose location is marked as shared, are potential candidates to appear on Views. This means that the Panoramio user community will be dispersed in the Google social network. There will be no more a proper space for the community. There will be people scattered through various existing communities on Google+. This will end the Panoramio community identity.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Who does not want their pictures to be published on Google Maps or on Views must choose not to share the location of your photos.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;It is true that everything must have an evolution. It is also true that Panoramio.com is not prepared to the trends of mobility. But it is also true that the 9 years long Panoramio community built something important to millions of people worldwide. For over seven years Google gained much popularity for Maps thanks to this community. The least that can be done now is to fight so that the stories and memories present in Panoramio will not disappear forever.&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/3511590087607376692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2014/09/google-vai-apagar-o-panoramio.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/3511590087607376692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/3511590087607376692'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2014/09/google-vai-apagar-o-panoramio.html' title='Google will delete Panoramio'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj47qje8Rk1wKvUqwIAqGhqQiqc8dv7qB9qhNAwrAuTBQifhlAffZPaviM6yHMZuAaw79Xgl64ZKAsThaW35X94rtLds1TauxZrxhI7tMIdWTieJNY2vFGB5j39Y2b9n-zb0NVvI2j_YUU/s72-c/panoramio.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-6337835296902179057</id><published>2014-09-24T07:30:00.000+01:00</published><updated>2015-06-26T10:20:02.319+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Meus Mapas"/><category scheme="http://www.blogger.com/atom/ns#" term="My Maps"/><title type='text'>Google My Maps is back and refreshed</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNEU0kJ2-slH82QpV4CrbEVyu0XuLlZyQBbglqvh_uDmzzeeYQ-zP27-AMB72PKZlu4oQFtROPi16m3bIxHd6XjFkQ-gjvXLa98be726m2_rgqQskvMU4jAZUYQ5dukpbzU-C5O44k9I/s1600/my_maps_intro.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNEU0kJ2-slH82QpV4CrbEVyu0XuLlZyQBbglqvh_uDmzzeeYQ-zP27-AMB72PKZlu4oQFtROPi16m3bIxHd6XjFkQ-gjvXLa98be726m2_rgqQskvMU4jAZUYQ5dukpbzU-C5O44k9I/s1600/my_maps_intro.jpg&quot; alt=&quot;My Maps&quot; height=&quot;181&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;My Maps allows you to create custom maps that can be shared or embedded into webpages.&lt;br /&gt;This service already existed in the previous classic version of Google Maps.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; However, it was removed and now appears refreshed and with new features.&lt;/p&gt;
&lt;p&gt;In March 2013 Google launches &lt;a href=&quot;http://google-latlong.blogspot.pt/2013/03/create-collaborate-and-share-advanced.html&quot; target=&quot;_blank&quot; title=&quot;Google Maps Engine Lite&quot;&gt;Google Maps Engine Lite&lt;/a&gt;, a less robust version of &lt;a href=&quot;http://www.google.com/enterprise/mapsearth/products/mapsengine.html&quot; target=&quot;_blank&quot; title=&quot;Google Maps Engine&quot;&gt;Google Maps Engine&lt;/a&gt; directed to the business sector. At that time, Google asked My Maps users to export their maps for Maps Engine Lite platform. With this communication it was expected that My Maps service would change.&lt;/p&gt;
&lt;p&gt;After the last major change in the layout and functionality of Google Maps, which took place earlier this year, Google removed My Maps service. It seems that this move did not achieve the desired success, perhaps because many people did not know where to look for Maps Engine Lite.&lt;br /&gt;
Now it announced the &lt;a href=&quot;http://google-latlong.blogspot.pt/2014/09/make-your-own-way-with-new-my-maps.html&quot; target=&quot;_blank&quot; title=&quot;Make your own way with the new My Maps&quot;&gt;new version of My Maps&lt;/a&gt;, which is no more than a new name for the Maps Engine Lite. The name My Maps is better suited to the purpose for which it is intended and people identify better with this name.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNEU0kJ2-slH82QpV4CrbEVyu0XuLlZyQBbglqvh_uDmzzeeYQ-zP27-AMB72PKZlu4oQFtROPi16m3bIxHd6XjFkQ-gjvXLa98be726m2_rgqQskvMU4jAZUYQ5dukpbzU-C5O44k9I/s1600/my_maps_intro.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNEU0kJ2-slH82QpV4CrbEVyu0XuLlZyQBbglqvh_uDmzzeeYQ-zP27-AMB72PKZlu4oQFtROPi16m3bIxHd6XjFkQ-gjvXLa98be726m2_rgqQskvMU4jAZUYQ5dukpbzU-C5O44k9I/s1600/my_maps_intro.jpg&quot; alt=&quot;My Maps&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
What’s new&lt;/h3&gt;
&lt;p&gt;As was usual, you can create a map to save the location of points of interest, driving routes, add photos and videos. Now, you can share maps in the same way we share Google documents, import locations from a spreadsheet or organize markers in layers.&lt;br /&gt;
This new version comes with the application &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.google.android.apps.m4b&quot; target=&quot;_blank&quot; title=&quot;My Maps for Android&quot;&gt;My Maps for Android&lt;/a&gt; that allows viewing, correction or addition of maps.&lt;/p&gt;
&lt;p&gt;Important notes to consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After the conversion of the old maps to the new version, you can no longer view the maps in the classic version.&lt;/li&gt;
&lt;li&gt;Custom maps are available in the My Maps application for Android, but you can not view them in Google Maps application for Android or Google Earth for iOS application.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Start using My Maps&lt;/h3&gt;
&lt;p&gt;First you must log in your Google account.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New users&lt;/b&gt; just go to &lt;a href=&quot;https://www.google.com/maps/d/&quot; target=&quot;_blank&quot; title=&quot;My Maps&quot;&gt;https://www.google.com/maps/d/&lt;/a&gt;, select the &quot;Create a new map&quot; and start using the My Maps.&lt;/p&gt;
&lt;p&gt;Those &lt;b&gt;who used the previous version&lt;/b&gt; of My Maps, and when &lt;a href=&quot;https://mapsengine.google.com/map/splash?app=mp&quot; target=&quot;_blank&quot; title=&quot;Update Now My Maps&quot;&gt;accessing the home page for the first time,&lt;/a&gt; will be asked to upgrade to the new version. This is a process that takes a few seconds and you only need to choose the &quot;Update Now&quot;.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8MRX8s8VGnwwVGRmlHwyvXA9kIwdGSZQdJlT_Bssv23-utkd98_PYwmTeLacpEH07iQ3aHmUw0BYxh1XXypPzQZFjb5yGzwsV7wxQMGgqgGDBP65FDAOzLVBtnvcyFTOJGpMvJctVQJM/s1600/my_maps_actualizar.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8MRX8s8VGnwwVGRmlHwyvXA9kIwdGSZQdJlT_Bssv23-utkd98_PYwmTeLacpEH07iQ3aHmUw0BYxh1XXypPzQZFjb5yGzwsV7wxQMGgqgGDBP65FDAOzLVBtnvcyFTOJGpMvJctVQJM/s1600/my_maps_actualizar.jpg&quot; alt=&quot;Update My Maps&quot; height=&quot;320&quot; width=&quot;239&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Then a confirmation window for updating the My Maps will appear. If you are sure you want to update just choose the &quot;Update&quot; option.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAQyf5oEFE29cUrn0jzYEf41WMAMqGu0t8FTXfpNRISkg3DYqy-OQbUJQForOAi52MjzGzVDdYjKk1RUd8uJrwGYs8qEfSC0eHniDP8uURrx8w3hCFqaVvTebczyI_zCCuGBB0FBHbMUc/s1600/my_maps_actualizar_confirma.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAQyf5oEFE29cUrn0jzYEf41WMAMqGu0t8FTXfpNRISkg3DYqy-OQbUJQForOAi52MjzGzVDdYjKk1RUd8uJrwGYs8qEfSC0eHniDP8uURrx8w3hCFqaVvTebczyI_zCCuGBB0FBHbMUc/s1600/my_maps_actualizar_confirma.jpg&quot; alt=&quot;My Maps&quot; height=&quot;210&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;When the process is complete you will see the message confirming the update.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGVX0851TI4hjqFx5E586wsr-kngiC8Ixjwj-3OWuSxyfMLYIgnSHtvcXdehZ_dBqdCGVumICT-vtDn0AZDaOLg8nneDB6FAqajMcZHvuC0-56XseA0PisBKYaDqVq2_ndyhFL_t6K8mw/s1600/my_maps_actualizado.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGVX0851TI4hjqFx5E586wsr-kngiC8Ixjwj-3OWuSxyfMLYIgnSHtvcXdehZ_dBqdCGVumICT-vtDn0AZDaOLg8nneDB6FAqajMcZHvuC0-56XseA0PisBKYaDqVq2_ndyhFL_t6K8mw/s1600/my_maps_actualizado.jpg&quot; alt=&quot;My maps&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;From here you can view your existing maps or add new maps.&lt;/p&gt;
&lt;h3&gt;How to access custom maps&lt;/h3&gt;
&lt;p&gt;Google must have considered that Maps Engine Lite has now reached the necessary maturity and gives the My Maps the prominence it deserves.&lt;br /&gt;
To access the My Maps just enter the &lt;a href=&quot;https://www.google.com/maps/&quot; target=&quot;_blank&quot; title=&quot;Google Maps&quot;&gt;standard Google Maps&lt;/a&gt;, &lt;b&gt;click on the search box&lt;/b&gt; and then on &quot;My Maps&quot; that appears below the search box.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih5jwwfL4KCsX80ROO-YgrOoTQDddFIe_wihMR8LS_m0gyiA5Fj4JeLWLgUqm9zyUcbdo1RjjKl62zWym7H6YYuxXn7zshHZZRYoWnfaKPKgIALu5V8O_9YJRSkWcFbH7PidYRWwT4knk/s1600/my_maps_meumapa.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih5jwwfL4KCsX80ROO-YgrOoTQDddFIe_wihMR8LS_m0gyiA5Fj4JeLWLgUqm9zyUcbdo1RjjKl62zWym7H6YYuxXn7zshHZZRYoWnfaKPKgIALu5V8O_9YJRSkWcFbH7PidYRWwT4knk/s1600/my_maps_meumapa.jpg&quot; alt=&quot;My Maps&quot; height=&quot;109&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Then you can view your existing maps using the link &lt;b&gt;&quot;Try a custom map&quot;&lt;/b&gt; or start immediately with the creation of a new map using the &lt;b&gt;&quot;Create&quot;&lt;/b&gt; button.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOGrt1wpp_LkVOmMk97efQ6cRpIp2oW6kUkQ9jarVOEvdJCCzY6TyKJFoZzQsiS2ixD5rcSf5bI28Dj4X95iCHAG9pGQnbRFHmhbkSNkhyphenhyphenQWpO2EgCJIFOivGpg5g_ohezAOK0-jgPxSg/s1600/my_maps_novomapa.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOGrt1wpp_LkVOmMk97efQ6cRpIp2oW6kUkQ9jarVOEvdJCCzY6TyKJFoZzQsiS2ixD5rcSf5bI28Dj4X95iCHAG9pGQnbRFHmhbkSNkhyphenhyphenQWpO2EgCJIFOivGpg5g_ohezAOK0-jgPxSg/s1600/my_maps_novomapa.jpg&quot; alt=&quot;My Maps&quot; height=&quot;85&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;FAQ&lt;/h3&gt;
&lt;p&gt;The new My Maps in the free version is limited to 2500 points, lines or shapes. You can only use up to 5 layers to organize the markers and is limited to 2,500 daily views.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;UPDATED &lt;small&gt;(December 5, 2014)&lt;/small&gt;&lt;/b&gt;&lt;br /&gt;
From now on Google My Maps Pro is free. The above limits shall be as follows: 10 000 points, lines or shapes, 10 layers per map, and 25 000 daily views.&lt;/p&gt;
&lt;p&gt;It is recommended the reading of the new &lt;a href=&quot;https://support.google.com/maps/answer/6009908?hl=pt&quot; target=&quot;_blank&quot; title=&quot;My Maps FAQ&quot;&gt;My Maps FAQ&lt;/a&gt; and also the complete list of the &lt;a href=&quot;https://support.google.com/mymaps/answer/3370982&quot; target=&quot;_blank&quot; title=&quot;limits of use&quot;&gt;limits of use&lt;/a&gt; on the table &lt;b&gt;&quot;compare the My Maps editions&quot;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;My Maps is excellent for planning the next holiday trip or to share meeting points with friends.&lt;br /&gt;Small or medium-sized enterprises can use My Maps to indicate your location, embedding a map in your web site&#39;s contact page.&lt;br /&gt;
The ideas for new maps are almost endless and Google offers a &lt;a href=&quot;http://maps.google.com/gallery/?hl=en&amp;utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=NA-LCS-2014-Geo-Products-MapsGallery-HouseAds&amp;utm_term=%2Bmaps%20%2Bgallery&amp;utm_content=SearchAd&amp;gclid=Cj0KEQjwyrqgBRDepamt-LWA2oABEiQAV7nwwMrQiemNoGcXLiv--oO_IG54i_63A2TG34K5YdQMz-EaAp2X8P8HAQ&quot; target=&quot;_blank&quot;&gt;gallery of examples&lt;/a&gt; for using the new My Maps.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Now it&#39;s time to start mapping ... and share!&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;&lt;i&gt;The comments section is open to sharing links to your maps.&lt;/i&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/6337835296902179057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2014/09/google-my-maps-esta-de-volta.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/6337835296902179057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/6337835296902179057'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2014/09/google-my-maps-esta-de-volta.html' title='Google My Maps is back and refreshed'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNEU0kJ2-slH82QpV4CrbEVyu0XuLlZyQBbglqvh_uDmzzeeYQ-zP27-AMB72PKZlu4oQFtROPi16m3bIxHd6XjFkQ-gjvXLa98be726m2_rgqQskvMU4jAZUYQ5dukpbzU-C5O44k9I/s72-c/my_maps_intro.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-3427107932758094522</id><published>2014-09-19T05:16:00.000+01:00</published><updated>2018-03-25T22:21:13.410+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><category scheme="http://www.blogger.com/atom/ns#" term="Info Window"/><title type='text'>5 ways to customize Google Maps InfoWindow</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6fKiXtEH4LV9yXTvUVg60C6Ova_59dtkmekULYMjjuG-mEOFcGw5cTnkLibfcrsZGOUbuQSh4109oBSQdtly76HMR36leErYg0BAHXBbvFO27CBrkOMFq70poiP5fPcKZX0qH0EDiyA/s1600/styledinfowindow008.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6fKiXtEH4LV9yXTvUVg60C6Ova_59dtkmekULYMjjuG-mEOFcGw5cTnkLibfcrsZGOUbuQSh4109oBSQdtly76HMR36leErYg0BAHXBbvFO27CBrkOMFq70poiP5fPcKZX0qH0EDiyA/s1600/styledinfowindow008.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;The default Google Maps InfoWindow can be customized with these 5 easy steps.&lt;br /&gt;
A custom infowindow offers a differentiated style to your maps and it can and should be adapted to the overall look of your web site.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
In this article I will explain how you can create an infowindow header, repositioning of its tail, change the infowindow size and background color, give a new look to the infowindow close button, rounded corners and a fade effect.&lt;br /&gt;
I will not explain how to create maps, markers and infowindows. This information is available to you in the following articles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/09/como-criar-um-mapa-com-google-maps-api.html&quot; target=&quot;_blank&quot;&gt;How to create a map with Google Maps API v3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/09/adicionar-um-marcador-com-google-maps.html&quot; target=&quot;_blank&quot;&gt;Add a marker with Google Maps JavaScript API v3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/09/info-window-on-gogle-maps-api.html&quot; target=&quot;_blank&quot;&gt;InfoWindow on Google Maps API JavaScript v3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/12/mapa-com-varios-marcadores-google-maps.html&quot; target=&quot;_blank&quot;&gt;Creating a map with multiple markers - Google Maps API JavaScript v3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/5wayscustomizeinfowindow/example.html&quot; target=&quot;_blank&quot; title=&quot;How to customize the infowindow example&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/5wayscustomizeinfowindow.zip&quot; title=&quot;5wayscustomizeinfowindow.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;
Resources required&lt;/h3&gt;
&lt;p&gt;I use &lt;a href=&quot;http://jquery.com&quot; title=&quot;www.jquery.com&quot; target=&quot;_blank&quot;&gt;jQuery&lt;/a&gt; to make it easy to change the google maps infowindow style.&lt;br /&gt;
If you want you can &lt;a href=&quot;http://jquery.com/download/&quot; target=&quot;_blank&quot;&gt;download jQuery&lt;/a&gt; and use it from your own server, or you can use the &lt;a href=&quot;https://developers.google.com/speed/libraries/devguide#jquery&quot; target=&quot;_blank&quot;&gt;Google CDN&lt;/a&gt;. In this example I am using &lt;b&gt;jQuery v1.11.1&lt;/b&gt;.&lt;br /&gt; In order to use jQuery you must include the &lt;b&gt;jquery.js&lt;/b&gt; file in your &lt;b&gt;js&lt;/b&gt; folder. The HEAD of your HTML file must be set as follows.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;HTML /index.html&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-html&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;

    &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/style.css&quot;&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;https://maps.googleapis.com/maps/api/js?v=3.20&amp;amp;sensor=false&quot;&amp;gt;&amp;lt;/script&amp;gt;
    
    &amp;lt;!-- use the existing file in the js folder --&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;!-- alternatively you can use the Google CDN --&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/map.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  ...
  ...
&lt;/pre&gt;
&lt;p&gt;The changes to the infowindow shown in this example are &lt;b&gt;valid to versions 3.18, 3.19 and 3.20 of Google Maps API&lt;/b&gt;.&lt;br /&gt;To make sure that your infowindow doesn&#39;t look weird in the future, you must force the usage of the version 3.20. To do that you have to make a little change to the URL that calls the API. You have to insert the option &lt;i&gt;v=3.20&lt;/i&gt;.&lt;br /&gt;Now your URL looks like this: &quot;https://maps.googleapis.com/maps/api/js?&lt;b&gt;v=3.20&lt;/b&gt;&amp;sensor=false&quot;.&lt;br /&gt;The 3.20 version is the experimental version (since February 17, 2015). This means that the version will be available until November 2015.&lt;/p&gt;
&lt;p&gt;You must keep track of the &lt;a href=&#39;https://developers.google.com/maps/documentation/javascript/3.exp/reference&#39; title=&#39;Google Maps JavaScript API V3 Reference&#39; target=&#39;_blank&#39;&gt;API updates&lt;/a&gt; to be sure that your infowindow doesn&#39;t look weird.&lt;/p&gt;
&lt;h3&gt;
1. How to create an header to the infowindow&lt;/h3&gt;
&lt;p&gt;To highlight the title of the infowindow you can create a header with a different background color of the remaining content.&lt;br /&gt;
This is readily accomplished with some CSS rules.&lt;br /&gt;
Assuming that you have a div with &lt;b&gt;id=&quot;iw-container&quot;&lt;/b&gt;, which brings together all of your content, and your header is a div with &lt;b&gt;class=&quot;iw-title&quot;&lt;/b&gt;, you will attribute a blue color for the title background and a white for text.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
#iw-container  .iw-title {
   font-family: &#39;Open Sans Condensed&#39;, sans-serif;
   font-size: 22px;
   font-weight: 400;
   padding: 10px;
   background-color: #48b5e9;
   color: white;
   margin: 1px;
   border-radius: 2px 2px 0 0; /* In accordance with the rounding of the default infowindow corners. */
}
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg-mHwVD0wx8TaGg8mkF4qQxTqrAMOx0kxmD9yCAlEQTEtjhDbz8_2MbWhA8YgovaEoVuSLUg5bT9GdhbCFnDbwva1npNEb5N7kOqRd5HQTOAnuf37uab4RFgqx30oqHKF1obSOls-NzA/s1600/styledinfowindow001.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg-mHwVD0wx8TaGg8mkF4qQxTqrAMOx0kxmD9yCAlEQTEtjhDbz8_2MbWhA8YgovaEoVuSLUg5bT9GdhbCFnDbwva1npNEb5N7kOqRd5HQTOAnuf37uab4RFgqx30oqHKF1obSOls-NzA/s1600/styledinfowindow001.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;As you can see in the image, the background title doesn’t look very good with those margins. Here begins the change to the infowindow structure.&lt;br /&gt;
To remove the margins it is necessary to find the HTML element that wraps the infowindow. This element is a div with the following class &quot;.gm-style-iw&quot;. Knowing this and using some CSS rules you can change the style of this div to remove the margins.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
.gm-style-iw {
   width: 350px !important;
   top: 0 !important;
   left: 0 !important;
   border-radius: 2px 2px 0 0;
}
&lt;/pre&gt;
&lt;p&gt;Now the header and content occupy the left margin and the top but it doesn&#39;t occupy the entire infowindow. This happens because with the API update to version 3.18 a right margin is applied in the infowindow, not allowing their content to take its full width.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHf4e1OgQxlmzNpS0Je8hYR4rPzWq2KDlgHj8prF_IEwPp0aMH4uaf6XNpUdcltDxyUhllBN_oTv3fxlfDm2-rdjX30FhYJSLxbyqvDNiLxZh186HAMvaXlUP99pc_omnI0dwX6lQCirI/s1600/styledinfowindow002.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHf4e1OgQxlmzNpS0Je8hYR4rPzWq2KDlgHj8prF_IEwPp0aMH4uaf6XNpUdcltDxyUhllBN_oTv3fxlfDm2-rdjX30FhYJSLxbyqvDNiLxZh186HAMvaXlUP99pc_omnI0dwX6lQCirI/s1600/styledinfowindow002.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;To remove that right margin it is necessary to remove the DIV that make up the white background and the shadow. The white background of the infowindow and its shadow are two distinct elements but both are part of the previous div to .gm-style-iw div. Knowing this and using jQuery and the event of google maps API google.maps.event.addListener(infowindow, &#39;domready&#39;, function(), we can change the style of this div to remove the right margin.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
/*
 * The google.maps.event.addListener() event waits for
 * the creation of the infowindow HTML structure &#39;domready&#39;
 * and before the opening of the infowindow defined styles
 * are applied.
 */
google.maps.event.addListener(infowindow, &#39;domready&#39;, function() {

   // Reference to the DIV which receives the contents of the infowindow using jQuery
   var iwOuter = $(&#39;.gm-style-iw&#39;);

   /* The DIV we want to change is above the .gm-style-iw DIV.
    * So, we use jQuery and create a iwBackground variable,
    * and took advantage of the existing reference to .gm-style-iw for the previous DIV with .prev().
    */
   var iwBackground = iwOuter.prev();

   // Remove the background shadow DIV
   iwBackground.children(&#39;:nth-child(2)&#39;).css({&#39;display&#39; : &#39;none&#39;});

   // Remove the white background DIV
   iwBackground.children(&#39;:nth-child(4)&#39;).css({&#39;display&#39; : &#39;none&#39;});

});
&lt;/pre&gt;
&lt;p&gt;To complete the customization of the infowindow it is necessary to apply the following CSS rules to the DIV with the class .gm-style-iw.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
.gm-style-iw {
   width: 350px !important;
   top: 0 !important;
   left: 0 !important;
   background-color: #fff;
   box-shadow: 0 1px 6px rgba(178, 178, 178, 0.6);
   border: 1px solid rgba(72, 181, 233, 0.6);
   border-radius: 2px 2px 0 0;
}
&lt;/pre&gt;
&lt;p&gt;Now it doesn&#39;t have the right margin and the title and content occupy the entire width of the infowindow.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7PCyEMfXq2eaId8arJ7VKQng-qreeDa6jRUv2yD-UEGKNXo6BYmbp390suXR44oG_xgy6gyYqtlFG5BEbn6VVBhF6Jm2F27f2ljmuOzN3FpPMtjn-MGFnrL25M8hC_ZuiSbpWSm26UwM/s1600/styledinfowindow003.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7PCyEMfXq2eaId8arJ7VKQng-qreeDa6jRUv2yD-UEGKNXo6BYmbp390suXR44oG_xgy6gyYqtlFG5BEbn6VVBhF6Jm2F27f2ljmuOzN3FpPMtjn-MGFnrL25M8hC_ZuiSbpWSm26UwM/s1600/styledinfowindow003.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;With this change two problems arise, the close button and the tail of the infowindow are not in place. This leads us to take this opportunity to two more ways to customize our infowindow.&lt;/p&gt;
&lt;h3&gt;
2. Repositioning the infowindow&lt;/h3&gt;
&lt;p&gt;The last major change given to the infowindow, by Google Maps developers, was the framing of the infowindow with its marker. Now the infowindow appears centered over the marker.&lt;br /&gt;
But things do not have to be so linear and you can reposition the infowindow in relation to the marker.&lt;br /&gt;
This change requires two actions, repositioning the infowindow relative to its marker and reposition the tail (arrow) of the infowindow.&lt;br /&gt;
To move the infowindow you have to create a reference to the div that encompasses all the elements that make up the infowindow. This div is found two levels above the &lt;i&gt;.gm-style-iw&lt;/i&gt; div.&lt;br /&gt;
This div is referenced as follows.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
// Moves the infowindow 115px to the right.
iwOuter.parent().parent().css({left: &#39;115px&#39;});
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEanY7_jYrfR3skW_F0480WjUQsp-FD-l-mSQuwKMAI3al0HRQ7LfvXiVYle5XbBueI_Re8KbOsb0084WRXfsAFsSN6p4sJ0QORLDw_yFpvejkVAVo_dwjoUhcf6L4nibueX1KomjvtR0/s1600/styledinfowindow004.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEanY7_jYrfR3skW_F0480WjUQsp-FD-l-mSQuwKMAI3al0HRQ7LfvXiVYle5XbBueI_Re8KbOsb0084WRXfsAFsSN6p4sJ0QORLDw_yFpvejkVAVo_dwjoUhcf6L4nibueX1KomjvtR0/s1600/styledinfowindow004.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;As shown in the previous image the tail of the infowindow does not point to its marker. It is necessary to move the tail to point to your marker.&lt;br /&gt;
The elements that make up the tail and its shadow are within the same div that groups the background of the infowindow.&lt;br /&gt;
All &lt;b&gt;tail shadow&lt;/b&gt; elements are grouped in the first descendant of iwBackground. So, with jQuery you set &lt;i&gt;iwBackground.children(&#39;:nth-child(1)&#39;)&lt;/i&gt;. The elements that make up the &lt;b&gt;tail&lt;/b&gt; are the third descendant - &lt;i&gt;iwBackground.children(&#39;:nth-child(3)&#39;)&lt;/i&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
// Moves the shadow of the arrow 76px to the left margin 
iwBackground.children(&#39;:nth-child(1)&#39;).attr(&#39;style&#39;, function(i,s){ return s + &#39;left: 76px !important;&#39;});

// Moves the arrow 76px to the left margin 
iwBackground.children(&#39;:nth-child(3)&#39;).attr(&#39;style&#39;, function(i,s){ return s + &#39;left: 76px !important;&#39;});
&lt;/pre&gt;
&lt;p&gt;Since you are working on the tail you can change the outline color to fit the contours of the infowindow and apply 1 to z-index to overlay the infowindow.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
// Changes the desired color for the tail outline.
// The outline of the tail is composed of two descendants of div which contains the tail.
// The .find(&#39;div&#39;).children() method refers to all the div which are direct descendants of the previous div. 
iwBackground.children(&#39;:nth-child(3)&#39;).find(&#39;div&#39;).children().css({&#39;box-shadow&#39;: &#39;rgba(72, 181, 233, 0.6) 0px 1px 6px&#39;, &#39;z-index&#39; : &#39;1&#39;});
&lt;/pre&gt;
&lt;p&gt;Now just move down the infowindow to frame with the tail.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
.gm-style-iw {
   width: 350px !important;
   top: 15px !important; // move the infowindow 15px down
   left: 0 !important;
   background-color: #fff;
   box-shadow: 0 1px 6px rgba(178, 178, 178, 0.6);
   border: 1px solid rgba(72, 181, 233, 0.6);
   border-radius: 2px 2px 0 0;
}
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtgQenOmUvxI1jrFFBX3miVg4A4CSK89oGihWZSfEqLGxxVufcfktPMkhtdtfae1TOCstbyQ6Q4v2p9-x0tUSO35TQHFY0hUagdiwumS9tbUB14w8nXV-sGM9z_rJS7ANE2TqTDJ5lYlE/s1600/styledinfowindow005.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtgQenOmUvxI1jrFFBX3miVg4A4CSK89oGihWZSfEqLGxxVufcfktPMkhtdtfae1TOCstbyQ6Q4v2p9-x0tUSO35TQHFY0hUagdiwumS9tbUB14w8nXV-sGM9z_rJS7ANE2TqTDJ5lYlE/s1600/styledinfowindow005.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
3. InfoWindow close button&lt;/h3&gt;
&lt;p&gt;The infowindow close button can take a little more highlight.&lt;br /&gt;
The following code repositions the button at the top right and creates an effect around the button.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;// Taking advantage of the already established reference to
// div .gm-style-iw with iwOuter variable.
// You must set a new variable iwCloseBtn.
// Using the .next() method of JQuery you reference the following div to .gm-style-iw.
// Is this div that groups the close button elements.
var iwCloseBtn = iwOuter.next();

// Apply the desired effect to the close button
iwCloseBtn.css({
  opacity: &#39;1&#39;, // by default the close button has an opacity of 0.7
  right: &#39;38px&#39;, top: &#39;3px&#39;, // button repositioning
  border: &#39;7px solid #48b5e9&#39;, // increasing button border and new color
  &#39;border-radius&#39;: &#39;13px&#39;, // circular effect
  &#39;box-shadow&#39;: &#39;0 0 5px #3990B9&#39; // 3D effect to highlight the button
  });

// The API automatically applies 0.7 opacity to the button after the mouseout event.
// This function reverses this event to the desired value.
iwCloseBtn.mouseout(function(){
  $(this).css({opacity: &#39;1&#39;});
});
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrWz2uqwFNLHvS0NGuISpSU827iJcCB9hzeOKyy4nrGQvzrx8hb_wUEK6pTPNb3Z-or6y64r-c8sv9TyZ9Q2MUWgFJpwFHMDDgDuN8gtp93mX-iRB3d09c3saGiX2Xylq200_brI10_rE/s1600/styledinfowindow006.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrWz2uqwFNLHvS0NGuISpSU827iJcCB9hzeOKyy4nrGQvzrx8hb_wUEK6pTPNb3Z-or6y64r-c8sv9TyZ9Q2MUWgFJpwFHMDDgDuN8gtp93mX-iRB3d09c3saGiX2Xylq200_brI10_rE/s1600/styledinfowindow006.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;If you want you can remove the Google Maps infowindow close button applying the following CSS rule: iwCloseBtn.css({&#39;display&#39;: &#39;none&#39;});&lt;/p&gt;
&lt;h3&gt;
4. Rounded corners&lt;/h3&gt;
&lt;p&gt;In previous versions of Google Maps the infowindow had much more rounded corners. It is a matter of taste and trends.&lt;br /&gt;
This task is very simple, just apply 10px to the CSS rule &lt;i&gt;border-radius&lt;/i&gt; of the &lt;i&gt;.gm-style-iw&lt;/i&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
.gm-style-iw {
   width: 350px !important;
   top: 15px !important;
   left: 0 !important;
   background-color: #fff;
   box-shadow: 0 1px 6px rgba(178, 178, 178, 0.6);
   border: 1px solid rgba(72, 181, 233, 0.6);
   border-radius: 2px 2px 10px 10px; // apply 10px to the bottom corners of the infowindow
}
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0X7xoCQLQRoqwfrb1s2DcjXaAvPr6b-ZFra5v88XOs6ClAolYgiaO0bcd-ws841jboCo9OEW7rzcnOltF69-pSPDZvhtJT4BstWTi2GiM_6idLYlbH24wbBXSd2iIZ6ffZgnmKdCnLms/s1600/styledinfowindow007.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0X7xoCQLQRoqwfrb1s2DcjXaAvPr6b-ZFra5v88XOs6ClAolYgiaO0bcd-ws841jboCo9OEW7rzcnOltF69-pSPDZvhtJT4BstWTi2GiM_6idLYlbH24wbBXSd2iIZ6ffZgnmKdCnLms/s1600/styledinfowindow007.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
5. &quot;Fade&quot; effect at the bottom of the infowindow&lt;/h3&gt;
&lt;p&gt;Finally we can apply a &quot;fade&quot; effect at the bottom of the infowindow. This effect suggests that there is more hidden content, calling for &quot;scroll&quot;.&lt;br /&gt;
This effect is achieved by superimposing one div with gradient effect on the last line of content.&lt;/p&gt;
&lt;p&gt;First of all you must create the DIV at the end of the HTML content of the infowindow.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;HTML /index.html&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-html&quot;&gt;
   &amp;lt;div class=&quot;iw-bottom-gradient&quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Then you set the CSS rules for the &lt;i&gt;iw-bottom-gradient&lt;/i&gt; class.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;
   .iw-bottom-gradient {
      position: absolute;
      width: 326px;
      height: 25px;
      bottom: 10px;
      right: 16px;
      background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
      background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
      background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
      background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
   }
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6fKiXtEH4LV9yXTvUVg60C6Ova_59dtkmekULYMjjuG-mEOFcGw5cTnkLibfcrsZGOUbuQSh4109oBSQdtly76HMR36leErYg0BAHXBbvFO27CBrkOMFq70poiP5fPcKZX0qH0EDiyA/s1600/styledinfowindow008.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6fKiXtEH4LV9yXTvUVg60C6Ova_59dtkmekULYMjjuG-mEOFcGw5cTnkLibfcrsZGOUbuQSh4109oBSQdtly76HMR36leErYg0BAHXBbvFO27CBrkOMFq70poiP5fPcKZX0qH0EDiyA/s1600/styledinfowindow008.jpg&quot; alt=&quot;google maps infowindow&quot; height=&quot;339&quot; width=&quot;430&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;This concludes the 5 ways to customize the Google Maps InfoWindow. Each customization can be applied alone or in full.&lt;br /&gt;
The end result is not the &quot;state of art&quot; but rather an exemplification of a possible way to give new life to the InfoWindow.&lt;/p&gt;
&lt;h3&gt;An example in action&lt;/h3&gt;
&lt;p data-height=&quot;366&quot; data-theme-id=&quot;13988&quot; data-slug-hash=&quot;xboPmG&quot; data-default-tab=&quot;result&quot; data-user=&quot;Marnoto&quot; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/Marnoto/pen/xboPmG/&#39;&gt;5 ways to customize the Google Maps infowindow&lt;/a&gt; by Miguel Marnoto (&lt;a href=&#39;http://codepen.io/Marnoto&#39;&gt;@Marnoto&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async src=&quot;//assets.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
&lt;p&gt;I invite you to leave a link in the comments and show your creativity with customizing infowindows.&lt;br /&gt;
All are welcome to share doubts and comments. Use the comment box so that all can share the info and the knowledge.&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
   &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
   &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
   &lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:336px;height:280px&quot;
     data-ad-client=&quot;ca-pub-0362839059472765&quot;
     data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
   &lt;script&gt;
   (adsbygoogle = window.adsbygoogle || []).push({});
   &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/5wayscustomizeinfowindow.zip&quot;&gt;5wayscustomizeinfowindow.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/3427107932758094522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2014/09/5-formas-de-personalizar-infowindow.html#comment-form' title='67 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/3427107932758094522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/3427107932758094522'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2014/09/5-formas-de-personalizar-infowindow.html' title='5 ways to customize Google Maps InfoWindow'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6fKiXtEH4LV9yXTvUVg60C6Ova_59dtkmekULYMjjuG-mEOFcGw5cTnkLibfcrsZGOUbuQSh4109oBSQdtly76HMR36leErYg0BAHXBbvFO27CBrkOMFq70poiP5fPcKZX0qH0EDiyA/s72-c/styledinfowindow008.jpg" height="72" width="72"/><thr:total>67</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-390679738852643864</id><published>2014-06-06T15:56:00.000+01:00</published><updated>2015-06-24T10:41:38.495+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Street View"/><title type='text'>Street View visits Brazil World Cup 2014 stadiums</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrteWuwU_KFpYblMKfFyJZOazFM4GfIMEjtao4uHT1s6ndAT0Lonf2TOwb-9TNtQEBi4elYzFHxxBJ_4hZ2ZLNJV7WOd_qUBYlYLISdSazYHxeDOCHsvNgIJVA-ReGCtKIPe70FQCwFJI/s1600/brasil2014.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrteWuwU_KFpYblMKfFyJZOazFM4GfIMEjtao4uHT1s6ndAT0Lonf2TOwb-9TNtQEBi4elYzFHxxBJ_4hZ2ZLNJV7WOd_qUBYlYLISdSazYHxeDOCHsvNgIJVA-ReGCtKIPe70FQCwFJI/s1600/brasil2014.jpg&quot; height=&quot;184&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Brazil&#39;s World Cup is about to begin. Pity is that not everyone will have the opportunity to be present. The Google Maps Street View offers the opportunity to &lt;a href=&quot;https://www.google.com/maps/views/streetview/brazils-world-cup-stadiums?gl=us&quot; title=&quot;Street View stadiums in Brazil&quot; target=&quot;_blank&quot;&gt;visit the inside of the stadiums&lt;/a&gt;. 360º images give an excellent perspective of the greatness of each stadium.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.google.com/maps/views/streetview/brazils-world-cup-stadiums?gl=us&quot; title=&quot;Street View stadiums in Brazil&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrteWuwU_KFpYblMKfFyJZOazFM4GfIMEjtao4uHT1s6ndAT0Lonf2TOwb-9TNtQEBi4elYzFHxxBJ_4hZ2ZLNJV7WOd_qUBYlYLISdSazYHxeDOCHsvNgIJVA-ReGCtKIPe70FQCwFJI/s1600/brasil2014.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;It is also possible to &lt;a href=&quot;https://www.google.com/maps/views/streetview/brazils-painted-streets?gl=us&quot; title=&quot;Street View Brazilian streets&quot; target=&quot;_blank&quot;&gt;“stroll” through some of Brazil&#39;s streets&lt;/a&gt;, nicely decorated strictly to receive the thousands of football fans.&lt;/p&gt;
&lt;p&gt;Who are you betting on to be the next world champion?&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.google.com/maps/views/streetview/brazils-painted-streets?gl=us&quot; title=&quot;Street View Brazilian streets&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoqGznZwdFy-NkzOhZZyWqzI823iNFmxsCZWurLUd-2qV2eJngILTlQYyw7DWDS4oWZqdzEuwK7pMww2S-6rjUeV10JVi_9wrrysp3VTbity4ghDzV-AZjpv9r9D8gLfiO37GSsIvObwo/s1600/brasilruas2014.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;&lt;br&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/390679738852643864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2014/06/street-view-estadios-do-brasil.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/390679738852643864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/390679738852643864'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2014/06/street-view-estadios-do-brasil.html' title='Street View visits Brazil World Cup 2014 stadiums'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrteWuwU_KFpYblMKfFyJZOazFM4GfIMEjtao4uHT1s6ndAT0Lonf2TOwb-9TNtQEBi4elYzFHxxBJ_4hZ2ZLNJV7WOd_qUBYlYLISdSazYHxeDOCHsvNgIJVA-ReGCtKIPe70FQCwFJI/s72-c/brasil2014.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-335648764728638484</id><published>2014-04-26T18:40:00.000+01:00</published><updated>2015-06-26T10:17:54.457+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Coordinates"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><title type='text'>How to convert lat long DD to DMS coordinates</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfuXVKfq4pBZV_b0q6oZCw6iT0tGr8ZPvFHYFB8BFCsvWzAhBXJyNiDCBZlmE59NVLJ9TKytxqapTJLElt-6nvTygoVyjNBsEa5sIF6_77dJvS-e4pGXli2IpQf7xNVKWrBjCG58LOOc/s1600/ddtodms.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img itemprop=&quot;image&quot; alt=&quot;Google Maps Coordinates&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfuXVKfq4pBZV_b0q6oZCw6iT0tGr8ZPvFHYFB8BFCsvWzAhBXJyNiDCBZlmE59NVLJ9TKytxqapTJLElt-6nvTygoVyjNBsEa5sIF6_77dJvS-e4pGXli2IpQf7xNVKWrBjCG58LOOc/s1600/ddtodms.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The geographical coordinates used by Google Maps are designated as coordinates DD (Decimal Degrees). In other words, these coordinates are in Decimal Degrees format (e.g. Lat 40.601203, Lng -8.668173).&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
Another representation format of geographic coordinates, quite common among GPS users, is the DMS format (Degrees, Minutes, Seconds, e.g N 40° 36&#39; 4.3&quot;, W 8° 40&#39; 5.4&quot;).&lt;br&gt;
&lt;span itemprop=&quot;description&quot;&gt;From DD coordinates, used to insert markers on the map, you can easily convert lat and long coordinates to DMS format.&lt;/span&gt; For sure this information will be very useful to your visitors.&lt;/p&gt;
&lt;div&gt;
  &lt;p&gt;&lt;span&gt;You may also be interested in:&lt;/span&gt;&lt;br&gt;
  &lt;span style=&quot;font-size: 24px; margin-left: 25px;&quot;&gt;&lt;a href=&quot;http://maps.marnoto.com/en/coordinate-converter/&quot; target=&quot;_blank&quot;&gt;Geographic coordinates converter&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h3&gt;The geographic coordinate system&lt;/h3&gt;
&lt;p&gt;It should first be noted that both systems divide the globe in 360 degrees, the difference is in the fraction of the degree. Latitude is between the value 0 at the equator to 90 degrees at the poles. Longitude is between the value 0 in the Greenwich meridian up to 180 degrees in the opposite side of the globe.&lt;br /&gt;
Thus you have the following values:&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;The latitude value greater than 0 (0 to 90) refers to the North (N) and below 0 (0 to -90) refers to the South (S).&lt;/li&gt;
   &lt;li&gt;The value of longitude 0 (0 to 180) refers East (E) and less than 0 (0 to -180) refers to the west (W).&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;p&gt;For example, if you have the coordinates Lat 40.601203 , Lng -8.668173 this means that the point is located in north latitude and west longitude.&lt;/p&gt;
   &lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/converting-coordinates/example.html&quot; target=&quot;_blank&quot; title=&quot;Example of a map with DMS coordinates&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/converting_coordinates.zip&quot;  title=&quot;converting_coordinates.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;Let&#39;s begin the coordinate conversion&lt;/h3&gt;
&lt;p&gt;First checks whether a given point is North, South, East or West.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
function ddToDms(lat, lng) {

   var lat = lat;
   var lng = lng;
   var latResult, lngResult;

   // Make sure that you are working with numbers.
   // This is important in case you are working with values
   // from input text in HTML.
   lat = parseFloat(lat);  
   lng = parseFloat(lng);

   // Check the correspondence of the coordinates for latitude: North or South.
   if (lat &gt;= 0) {
     latResult = &#39;N&#39;;
   } else {
     latResult = &#39;S&#39;;
   }

   // The previous example can be replaced by the following example,
   // in order to reduce the amount of code.
   latResult = (lat &gt;= 0)? &#39;N&#39; : &#39;S&#39;;

   // Check the correspondence of the coordinates for longitude: East or West.
   if (lng &gt;= 0) {
     lngResult = &#39;E&#39;;
   } else {
     lngResult = &#39;W&#39;;
   }

   // The previous example can be replaced by the following example
   // in order to reduce the amount of code.
   lngResult = (lng &gt;= 0)? &#39;E&#39; : &#39;W&#39;;
}
&lt;/pre&gt;
&lt;h3&gt;Coordinates in DMS format&lt;/h3&gt;
&lt;p&gt;The DMS format uses the angle measure to determine the position of the objects in the world.
&lt;br&gt;
The unit of measurement of the angle is the &lt;b&gt;degree&lt;/b&gt; and there are 360 degrees in a full circle. (Degrees symbol is &lt;b&gt;º&lt;/b&gt;)
&lt;br&gt;
Each degree is divided into 60 &lt;b&gt;minutes&lt;/b&gt;. (Minutes symbol is &lt;b&gt;&#39;&lt;/b&gt;) 1º = 60&#39;
&lt;br&gt;
Each minute is divided into 60 &lt;b&gt;seconds&lt;/b&gt;. (Seconds symbol is &lt;b&gt;&quot;&lt;/b&gt;) 1&#39; = 60&quot;
&lt;br&gt;
&lt;b&gt;So in 1 degree there are 60 * 60 seconds, or 3600 seconds.&lt;/b&gt;&lt;/p&gt;

&lt;h3&gt;The conversion of DD coordinates to DMS&lt;/h3&gt;
&lt;p&gt;The next step is the effective conversion of the coordinates to DMS format.
&lt;br&gt;
First you must understand the equivalence between the two formats. This step is very important for you to understand the necessary code.
&lt;br&gt;
Given the following value in DD Lat 40.601203.&lt;/p&gt;
&lt;ol&gt;
   &lt;li&gt;
   First of all remember that if the latitude value is positive, it means that the object is in the Northern hemisphere.
   &lt;/li&gt;
   &lt;li&gt;
   The integer equals the value of degrees in DMS format. That is, &lt;b&gt;the value of 40 in DD is equivalent to the value 40º in DMS&lt;/b&gt;.
   &lt;br&gt;
   Therefore you have: DMS Lat N 40º.
   &lt;/li&gt;
   &lt;li&gt;The decimal portion of DD is multiplied by 60 and the resulting integer converts to minutes in DMS format. In other words, &lt;b&gt;removing 40 to the value 40.601203 you get 0.601203. Then you multiply 0.601203 * 60 = 36.07218 so the value of minutes is 36&#39;&lt;/b&gt;.
   &lt;br&gt;
   Now you have: DMS Lat 40º 36&#39;
   &lt;/li&gt;
   &lt;li&gt;Now you use the resulting decimal portion of the multiplication of 0.601203 * 60 = 36.07218 and multiply by 60. In other words, &lt;b&gt;removing 36 to the value 36.07218 you get 0.07218. Then you multiply 0.07218 * 60 = 4.3308. Generally the value of seconds is represented by 2 decimal places. Therefore you get the value 4.33”&lt;/b&gt;.
   &lt;br&gt;
   Finally you get the value: DMS Lat 40º 36&#39; 4.33&quot;
   &lt;br&gt;
   &lt;br&gt;
   &lt;b&gt;DD 40.601203 = DMS N 40º 36&#39; 4.33&quot;&lt;/b&gt;
   &lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
&lt;p&gt;Now you can jump to the JavaScript code that makes the automatic conversion to all existing markers in your project.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
// Function that converts DMS to DD.
// Taking as example the value -40.601203.
function getDms(val) {

   // Required variables
   var valDeg, valMin, valSec, result;

   // Here you&#39;ll convert the value received in the parameter to an absolute value.
   // Conversion of negative to positive.
   // In this step it does not matter if it&#39;s North, South, East or West,
   // such verification was performed earlier.
   val = Math.abs(val); // -40.601203 = 40.601203

   // ---- Degrees ----
   // Stores the integer of DD for the Degrees value in DMS
   valDeg = Math.floor(val); // 40.601203 = 40

   // Add the degrees value to the result by adding the degrees symbol &quot;º&quot;.
   result = valDeg + &quot;º&quot;; // 40º

   // ---- Minutes ----
   // Removing the integer of the initial value you get the decimal portion.
   // Multiply the decimal portion by 60.
   // Math.floor returns an integer discarding the decimal portion.
   // ((40.601203 - 40 = 0.601203) * 60 = 36.07218) = 36
   valMin = Math.floor((val - valDeg) * 60); // 36.07218 = 36

   // Add minutes to the result, adding the symbol minutes &quot;&#39;&quot;.
   result += valMin + &quot;&#39;&quot;; // 40º36&#39;

   // ---- Seconds ----
   // To get the value in seconds is required:
   // 1º - removing the degree value to the initial value: 40 - 40.601203 = 0.601203;
   // 2º - convert the value minutes (36&#39;) in decimal ( valMin/60 = 0.6) so
   // you can subtract the previous value: 0.601203 - 0.6 = 0.001203;
   // 3º - now that you have the seconds value in decimal,
   // you need to convert it into seconds of degree.
   // To do so multiply this value (0.001203) by 3600, which is
   // the number of seconds in a degree.
   // You get 0.001203 * 3600 = 4.3308
   // As you are using the function Math.round(),
   // which rounds a value to the next unit,
   // you can control the number of decimal places
   // by multiplying by 1000 before Math.round
   // and subsequent division by 1000 after Math.round function.
   // You get 4.3308 * 1000 = 4330.8 -&gt; Math.round = 4331 -&gt; 4331 / 1000 = 4.331
   // In this case the final value will have three decimal places.
   // If you only want two decimal places
   // just replace the value 1000 by 100.
   valSec = Math.round((val - valDeg - valMin / 60) * 3600 * 1000) / 1000; // 40.601203 = 4.331 

   // Add the seconds value to the result,
   // adding the seconds symbol &quot; &quot; &quot;.
   result += valSec + &#39;&quot;&#39;; // 40º36&#39;4.331&quot;

   // Returns the resulting string.
   return result;
 }
&lt;/pre&gt;
&lt;h3&gt;The final code&lt;/h3&gt;
&lt;p&gt;With a small change in the code of ddTomDms () function you can automatically convert the DD coordinates to DMS.
&lt;br&gt;
The following code shows how to use both functions together. The comments only show the necessary changes.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
// This function returns the coordinate
// conversion string in DD to DMS.
function ddToDms(lat, lng) {

   var lat = lat;
   var lng = lng;
   var latResult, lngResult, dmsResult;

   lat = parseFloat(lat);  
   lng = parseFloat(lng);

   latResult = (lat &gt;= 0)? &#39;N&#39; : &#39;S&#39;;

   // Call to getDms(lat) function for the coordinates of Latitude in DMS.
   // The result is stored in latResult variable.
   latResult += getDms(lat);

   lngResult = (lng &gt;= 0)? &#39;E&#39; : &#39;W&#39;;

   // Call to getDms(lng) function for the coordinates of Longitude in DMS.
   // The result is stored in lngResult variable.
   lngResult += getDms(lng);

   // Joining both variables and separate them with a space.
   dmsResult = latResult + &#39; &#39; + lngResult;

   // Return the resultant string
   return dmsResult;
}

function getDms(val) {

  var valDeg, valMin, valSec, result;

  val = Math.abs(val);

  valDeg = Math.floor(val);
  result = valDeg + &quot;º&quot;;

  valMin = Math.floor((val - valDeg) * 60);
  result += valMin + &quot;&#39;&quot;;

  valSec = Math.round((val - valDeg - valMin / 60) * 3600 * 1000) / 1000;
  result += valSec + &#39;&quot;&#39;;

  return result;
}
&lt;/pre&gt;
&lt;p&gt;The complete code is available on the link below. In this code a call is made to ddToDms() function as follows:&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;
var dmsCoords = ddToDms(latlng.lat(), latlng.lng());
&lt;/pre&gt;
&lt;p&gt;The dmsCoords variable is included in the construction of the Info Window. Or may be included in any other place, not forgetting the ordering of the parameters, first latitude and then longitude -&gt; ddToDms(lat, lng).&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;linkExemplos&quot;&gt;&lt;a class=&quot;btndemo&quot; href=&quot;http://maps.marnoto.com/en/converting-coordinates/example.html&quot; target=&quot;_blank&quot;&gt;View map example&lt;/a&gt;&lt;small&gt;  The 2014 World Cup stadiums in Brazil&lt;/small&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This example shows the location of the stadiums where Brazil 2014 Soccer World Cup games will take place. With a click on the markers an Info Window opens with the name and location of the stadium, a link to the respective web page at FIFA’s website and finally GPS coordinates in DMS format.&lt;/p&gt;
&lt;p&gt;If you need more information about creating maps with multiple markers, you can find it at the following article:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/12/mapa-com-varios-marcadores-google-maps.html&quot; target=&quot;_blank&quot;&gt;Map with multiple markers - Google Maps API JavaScript v3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; 
&lt;br /&gt;
&lt;p&gt;As usual, all doubts and comments are welcome.&lt;br /&gt;
Please use the comments section so that all can share on the information.&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
   &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
   &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
   &lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:336px;height:280px&quot;
     data-ad-client=&quot;ca-pub-0362839059472765&quot;
     data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
   &lt;script&gt;
   (adsbygoogle = window.adsbygoogle || []).push({});
   &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/converting_coordinates.zip&quot; &gt;converting_coordinates.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/335648764728638484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2014/04/converter-coordenadas-gps.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/335648764728638484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/335648764728638484'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2014/04/converter-coordenadas-gps.html' title='How to convert lat long DD to DMS coordinates'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfuXVKfq4pBZV_b0q6oZCw6iT0tGr8ZPvFHYFB8BFCsvWzAhBXJyNiDCBZlmE59NVLJ9TKytxqapTJLElt-6nvTygoVyjNBsEa5sIF6_77dJvS-e4pGXli2IpQf7xNVKWrBjCG58LOOc/s72-c/ddtodms.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-847288180472898495</id><published>2013-12-18T13:16:00.000+00:00</published><updated>2015-06-26T10:17:33.049+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Coordinates"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><title type='text'>How to get coordinates in new Google Maps</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDCEF4iFI0vNifuRBsEX8MXV4tt-FhOT9v5qdhyphenhyphenlhgYIQ42KqoCPRcARyTIR4rKiBOgbvIQv_0UI9NjBJdt7Bfi1eeRgGqcUTUFoCvuXLBYl5g6_20i10fl3-F2ad1AifzKUSSx8J-tbU/s1600/coords.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img itemprop=&quot;image&quot; alt=&quot;Google Maps coordinates&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDCEF4iFI0vNifuRBsEX8MXV4tt-FhOT9v5qdhyphenhyphenlhgYIQ42KqoCPRcARyTIR4rKiBOgbvIQv_0UI9NjBJdt7Bfi1eeRgGqcUTUFoCvuXLBYl5g6_20i10fl3-F2ad1AifzKUSSx8J-tbU/s1600/coords.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The new Google Maps is much more aesthetically appealing to our eyes but many features were left behind. Gradually Google is implementing some of the most useful tools that were available in the earlier version.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; With the previous version it was easy to find out the coordinates of a location in decimal degrees format (DDD:&amp;nbsp;40.604036,&amp;nbsp;-8.665247) but this option has not yet been implemented in the new Google Maps.&lt;/p&gt;
&lt;div&gt;
  &lt;span&gt;You may also be interested in:&lt;/span&gt;&lt;br&gt;
  &lt;span style=&quot;font-size: 24px; margin-left: 25px;&quot;&gt;&lt;a href=&quot;http://maps.marnoto.com/en/coordinate-converter/&quot; target=&quot;_blank&quot;&gt;Geographic coordinates converter&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;At the time of writing the only way to find out these coordinates is through the URL.&lt;br /&gt;
With a click on the map a box in the upper left corner appears showing the GPS coordinates.  With a click on these coordinates the URL of the page is changed and the DDD coordinates can be found at the end of the URL.&lt;br /&gt;
The following example shows the full address of a location after clicking on its GPS coordinates.&lt;/p&gt;
&lt;blockquote class=&quot;quote center&quot;&gt;
https://www.google.com/maps/preview#!q=40%C2%B0+38.396&#39;%2C+-8%C2%B0+36.570&#39;&amp;amp;data=!4m14!2m13!1m12!3m8!1m3!1d10723!2d-8.6007929!3d40.6367078!3m2!1i1366!2i680!4f13.1!4m2!3d&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;40.6399333&lt;/span&gt;&lt;/b&gt;!4d&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;-8.6095&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;With Google Maps API we can easily create our own coordinate search system in decimal degrees format.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/coordinates-search/example.html&quot; target=&quot;_blank&quot; title=&quot;Example how to get coordinates in new Google Maps&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/coordinates_search.zip&quot; title=&quot;coordinates_search.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;Update &lt;small&gt;(April 3, 2014)&lt;/small&gt;&lt;/h3&gt;
&lt;p&gt;In late February, the Google Maps team brought back the ability to right click on the map to get map coordinates. Thus, it is again possible to get directions to or from the place as well as view the latitude and longitude.&lt;/p&gt;
&lt;img class=&quot;aligncenter&quot; alt=&quot;Google Maps coordinates&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrip5fBMJ_5e2_F6PKiMesBs6qNCcZ3QGLRtCT56MHsYxkZy497Vg4E_YQekMkDiWYVJlhR6dnF9NpQpW3yWpIq8zRJg0Gp_9efXDWKI9O9H5HbPe-6PX0qY2uPXJrRJZMFXogxHzemkE/s1600/gm_coords_en.gif&quot; title=&quot;&quot; /&gt;
&lt;h3&gt;
Implementation of a latitude and longitude finder&lt;/h3&gt;
&lt;p&gt;With Google Maps API it&#39;s very simple to implement a &quot;find my latitude longitude&quot; system. First, it is necessary to make use of the event that detects a click on the map and insert a marker on the map. At the same time we store the coordinates of latitude and longitude in the text boxes available at the top of the page.&lt;br /&gt;
The following code demonstrates how to start the map and detect a click on the map. The comments included in the code should be sufficient for you to understand the process.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;// required variables
var map;
var marker;

function initialize() {
   var mapOptions = {
      center: new google.maps.LatLng(40.601203,-8.668173),
      zoom: 9,
      mapTypeId: &#39;roadmap&#39;
   };

   map = new google.maps.Map(document.getElementById(&#39;map-canvas&#39;), mapOptions);

   // This event detects a click on the map
   google.maps.event.addListener(map, &quot;click&quot;, function(event) {

      // Get lat lng coordinates
      // This method returns the position of the click on the map
      var lat = event.latLng.lat().toFixed(6);
      var lng = event.latLng.lng().toFixed(6);

      // Call createMarker() function to create a marker on the map
      createMarker(lat, lng);

      // getCoords() function inserts lat and lng values into text boxes
      getCoords(lat, lng);

   });
}
google.maps.event.addDomListener(window, &#39;load&#39;, initialize);
&lt;/pre&gt;
&lt;p&gt;Now let&#39;s view the code to create the marker on the map, with the addition of the event that detects drag movement of the marker for a precise placement.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;// Function that creates the marker
function createMarker(lat, lng) {

   // The purpose is to create a single marker, so
   // check if there is already a marker on the map.
   // With a new click on the map the previous
   // marker is removed and a new one is created.

   // If the marker variable contains a value
   if (marker) {
      // remove that marker from the map
      marker.setMap(null);
      // empty marker variable
      marker = &quot;&quot;;
   }

   // Set marker variable with new location
   marker = new google.maps.Marker({
      position: new google.maps.LatLng(lat, lng),
      draggable: true, // Set draggable option as true
      map: map
   });


   // This event detects the drag movement of the marker.
   // The event is fired when left button is released.
   google.maps.event.addListener(marker, &#39;dragend&#39;, function() {
      
      // Updates lat and lng position of the marker.
      marker.position = marker.getPosition();

      // Get lat and lng coordinates.
      var lat = marker.position.lat().toFixed(6);
      var lng = marker.position.lng().toFixed(6);

      // Update lat and lng values into text boxes.
      getCoords(lat, lng);

   });
}
&lt;/pre&gt;
&lt;p&gt;Updating the latitude and longitude values of the text boxes can be made as follows.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;// This function updates text boxes values.
function getCoords(lat, lng) {

   // Reference input html element with id=”lat”.
   var coords_lat = document.getElementById(&#39;lat&#39;);

   // Update latitude text box.
   coords_lat.value = lat;

   // Reference input html element with id=”lng”.
   var coords_lng = document.getElementById(&#39;lng&#39;);

   // Update longitude text box.
   coords_lng.value = lng;
}
&lt;/pre&gt;
&lt;p&gt;The usefulness of this small Google Maps coordinates detection system is limited. However, the methods may be adapted to more complex systems and enable a very interesting interaction with the API.&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
   &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
   &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
   &lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:336px;height:280px&quot;
     data-ad-client=&quot;ca-pub-0362839059472765&quot;
     data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
   &lt;script&gt;
   (adsbygoogle = window.adsbygoogle || []).push({});
   &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/coordinates_search.zip&quot;&gt;coordinates_search.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;As usual, all doubts and comments are welcome.&lt;br /&gt;
Please use the comments section below so that all can share on the information.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/847288180472898495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2013/12/obter-coordenadas-no-novo-google-maps.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/847288180472898495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/847288180472898495'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2013/12/obter-coordenadas-no-novo-google-maps.html' title='How to get coordinates in new Google Maps'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDCEF4iFI0vNifuRBsEX8MXV4tt-FhOT9v5qdhyphenhyphenlhgYIQ42KqoCPRcARyTIR4rKiBOgbvIQv_0UI9NjBJdt7Bfi1eeRgGqcUTUFoCvuXLBYl5g6_20i10fl3-F2ad1AifzKUSSx8J-tbU/s72-c/coords.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-6006178194252240222</id><published>2013-12-14T19:54:00.000+00:00</published><updated>2015-08-10T19:19:30.113+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><category scheme="http://www.blogger.com/atom/ns#" term="Info Window"/><category scheme="http://www.blogger.com/atom/ns#" term="Markers"/><title type='text'>Creating a map with multiple markers - Google Maps API JavaScript v3</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgE6fL_M8K-DdSw4UeVvL2exqDveEGkru5CBlDRDlB4b8GOlycZrOCnsDlF_81yVt7PCgT7_azv49VFnLU9W9wBikDzlAy6ieXLlYPRQWBe_MOIFmNyadNADvMxQrY9Kfs8R-gqCTA7Ss/s1600/multimarker.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; itemprop=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgE6fL_M8K-DdSw4UeVvL2exqDveEGkru5CBlDRDlB4b8GOlycZrOCnsDlF_81yVt7PCgT7_azv49VFnLU9W9wBikDzlAy6ieXLlYPRQWBe_MOIFmNyadNADvMxQrY9Kfs8R-gqCTA7Ss/s1600/multimarker.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;Creating a map with multiple locations without using a database may be limited but it has its advantages where the number of places is reduced.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
When you want to place up to 10 or 15 markers on a Google map in your website, it may be more effective to include it in a variable next to the code that creates the map.&lt;br /&gt;
In this article I will not go on the details of creation of maps, markers or infowindow. This information is available in the following articles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/09/como-criar-um-mapa-com-google-maps-api.html&quot; target=&quot;_blank&quot;&gt;How to create a map with Google Maps API v3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/09/adicionar-um-marcador-com-google-maps.html&quot; target=&quot;_blank&quot;&gt;Add a marker with Google Maps JavaScript API v3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2013/09/info-window-on-gogle-maps-api.html&quot; target=&quot;_blank&quot;&gt;Info Window on Google Maps API JavaScript v3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/multiple-markers/example.html&quot; target=&quot;_blank&quot; title=&quot;Example of a map with multiple markers&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/multiple_markers.zip&quot; title=&quot;multiple_markers.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;
Defining markers information&lt;/h3&gt;
&lt;p&gt;First it is necessary to define the position of the marker in the map and the information to be shown in the Info Window.&lt;br /&gt;
The information is stored in an &lt;i&gt;array of objects&lt;/i&gt; variable called &lt;b&gt;&lt;i&gt;markersData&lt;/i&gt;&lt;/b&gt; like shown below:&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;var markersData = [
  {
      lat: 40.6386333,
      lng: -8.745,
      name: &quot;Camping Praia da Barra&quot;,
      address1:&quot;Rua Diogo Cão, 125&quot;,
      address2: &quot;Praia da Barra&quot;,
      postalCode: &quot;3830-772 Gafanha da Nazaré&quot; // don’t insert comma in the last item of each marker
   },
   {
      lat: 40.59955,
      lng: -8.7498167,
      name: &quot;Camping Costa Nova&quot;,
      address1:&quot;Quinta dos Patos, n.º 2&quot;,
      address2: &quot;Praia da Costa Nova&quot;,
      postalCode: &quot;3830-453 Gafanha da Encarnação&quot; // don’t insert comma in the last item of each marker
   },
   {
      lat: 40.6247167,
      lng: -8.7129167,
      name: &quot;Camping Gafanha da Nazaré&quot;,
      address1:&quot;Rua dos Balneários do Complexo Desportivo&quot;,
      address2: &quot;Gafanha da Nazaré&quot;,
      postalCode: &quot;3830-225 Gafanha da Nazaré&quot; // don’t insert comma in the last item of each marker
   } // don’t insert comma in last item
];&lt;/pre&gt;
&lt;p&gt;This way of storing information is not the most effective from the viewpoint of performance of the JavaScript code. However what is intended here is to show, in the clearest possible way, how to create a procedure to insert multiple markers on a map.&lt;/p&gt;
&lt;h3&gt;
How to create markers&lt;/h3&gt;
&lt;p&gt;To enter the previously defined markers on the map it is necessary to create a function (&lt;i&gt;displayMarkers()&lt;/i&gt;) that goes through each item in &lt;i&gt;markersData object array&lt;/i&gt;&amp;nbsp; and create the respective marker using the function (&lt;i&gt;createMarker()&lt;/i&gt;).&lt;br /&gt;
Let&#39;s take a look at the code:&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;// This function will iterate over markersData array
// creating markers with createMarker function
function displayMarkers(){

   // this variable sets the map bounds and zoom level according to markers position
   var bounds = new google.maps.LatLngBounds();

   // For loop that runs through the info on markersData making it possible to createMarker function to create the markers
   for (var i = 0; i &amp;lt; markersData.length; i++){

      var latlng = new google.maps.LatLng(markersData[i].lat, markersData[i].lng);
      var name = markersData[i].name;
      var address1 = markersData[i].address1;
      var address2 = markersData[i].address2;
      var postalCode = markersData[i].postalCode;

      createMarker(latlng, name, address1, address2, postalCode);

      // Marker’s Lat. and Lng. values are added to bounds variable
      bounds.extend(latlng); 
   }

   // Finally the bounds variable is used to set the map bounds
   // with API’s fitBounds() function
   map.fitBounds(bounds);
}
&lt;/pre&gt;
&lt;p&gt;The comments inserted in the code should be sufficient to understand how this function behaves. This function runs on each item in &lt;i&gt;markersData&lt;/i&gt; variable and calls &lt;i&gt;createMarker&lt;/i&gt; function, passing its information. Additionally the &lt;i&gt;bounds&lt;/i&gt; variable stores the position of each marker. This variable will be used as the parameter for &lt;i&gt;fitBounds()&lt;/i&gt; function.&lt;/p&gt;
&lt;p&gt;Now let’s look at the function createMarker():&lt;br /&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;// This function creates each marker and sets their Info Window content
function createMarker(latlng, name, address1, address2, postalCode){
   var marker = new google.maps.Marker({
      map: map,
      position: latlng,
      title: name
   });

   // This event expects a click on a marker
   // When this event is fired the infowindow content is created
   // and the infowindow is opened
   google.maps.event.addListener(marker, &#39;click&#39;, function() {
      
      // Variable to define the HTML content to be inserted in the infowindow
      var iwContent = &#39;&amp;lt;div id=&quot;iw_container&quot;&amp;gt;&#39; +
      &#39;&amp;lt;div class=&quot;iw_title&quot;&amp;gt;&#39; + name + &#39;&amp;lt;/div&amp;gt;&#39; +
      &#39;&amp;lt;div class=&quot;iw_content&quot;&amp;gt;&#39; + address1 + &#39;&amp;lt;br /&amp;gt;&#39; +
      address2 + &#39;&amp;lt;br /&amp;gt;&#39; +
      postalCode + &#39;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&#39;;
      
      // including content to the infowindow
      infoWindow.setContent(iwContent);

      // opening the infowindow in the current map and at the current marker location
      infoWindow.open(map, marker);
   });
}
&lt;/pre&gt;
&lt;p&gt;Markers are added to the map through the variable &lt;i&gt;marker&lt;/i&gt;. Additionally, the Info Window content is created for each marker.&lt;/p&gt;
&lt;p&gt;These two functions are meaningless by themselves without the function that initializes the creation of the map:&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;function initialize() {
   var mapOptions = {
      center: new google.maps.LatLng(40.601203,-8.668173),
      zoom: 9,
      mapTypeId: &#39;roadmap&#39;,
   };

   map = new google.maps.Map(document.getElementById(&#39;map-canvas&#39;), mapOptions);

   // a new Info Window is created
   infoWindow = new google.maps.InfoWindow();

   // Event that closes the InfoWindow with a click on the map
   google.maps.event.addListener(map, &#39;click&#39;, function() {
      infoWindow.close();
   });

   // Finally displayMarkers() function is called to begin the markers creation
   displayMarkers();
}
google.maps.event.addDomListener(window, &#39;load&#39;, initialize);
&lt;/pre&gt;
&lt;span class=&quot;linkExemplos&quot;&gt;&lt;a class=&quot;btndemo&quot; href=&quot;http://maps.marnoto.com/en/multiple-markers/example.html&quot; target=&quot;_blank&quot;&gt;View example&lt;/a&gt;&lt;/span&gt;
&lt;p&gt;This example shows how to add multiple markers on a map. There is only one Info Window that will be used for all markers. This means that only one Info Window can be shown at each click on a marker.&lt;/p&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
   &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
   &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
   &lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:336px;height:280px&quot;
     data-ad-client=&quot;ca-pub-0362839059472765&quot;
     data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
   &lt;script&gt;
   (adsbygoogle = window.adsbygoogle || []).push({});
   &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/multiple_markers.zip&quot;&gt;multiple_markers.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;As usual, all doubts and comments are welcome. Please use the comments section so that all can share on the information.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/6006178194252240222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2013/12/mapa-com-varios-marcadores-google-maps.html#comment-form' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/6006178194252240222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/6006178194252240222'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2013/12/mapa-com-varios-marcadores-google-maps.html' title='Creating a map with multiple markers - Google Maps API JavaScript v3'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgE6fL_M8K-DdSw4UeVvL2exqDveEGkru5CBlDRDlB4b8GOlycZrOCnsDlF_81yVt7PCgT7_azv49VFnLU9W9wBikDzlAy6ieXLlYPRQWBe_MOIFmNyadNADvMxQrY9Kfs8R-gqCTA7Ss/s72-c/multimarker.jpg" height="72" width="72"/><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-5961662871411202037</id><published>2013-09-26T11:01:00.002+01:00</published><updated>2015-06-26T10:16:54.328+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><category scheme="http://www.blogger.com/atom/ns#" term="Info Window"/><title type='text'>Info Window on Google Maps API JavaScript v3</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_fn71nCFslmoOJsUiUckrcwuu6QP7rmS2QmklYEeuHhp2Oz6imZbusB0IQwq1krcTKsAQMbr-cgKQQGhCV8a78EegFMykBAmH4V3AGb8a0LoidN5cPl0hJqQduaLOTB2DaLl7kTE26PY/s1600/infowindowmuseu2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; itemprop=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_fn71nCFslmoOJsUiUckrcwuu6QP7rmS2QmklYEeuHhp2Oz6imZbusB0IQwq1krcTKsAQMbr-cgKQQGhCV8a78EegFMykBAmH4V3AGb8a0LoidN5cPl0hJqQduaLOTB2DaLl7kTE26PY/s1600/infowindowmuseu2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&#39;description&#39;&gt;The Info Window on Google Maps is no more than a &amp;lt;div&amp;gt;, in the form of a cartoon balloon, with the position on the map defined through the coordinates of the corresponding marker.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Being the Info Window a &amp;lt;div&amp;gt;, it can be customized using CSS and it can also contain any other HTML elements therein.&lt;br /&gt;
Info Window contents can be defined at the start of the map, if the map contains only one marker, or later with a call to the API using the &lt;i&gt;setContent()&lt;/i&gt; function.&lt;/p&gt;
&lt;p&gt;When there is more than one marker on the map, the contents of the Info Window are defined when creating the marker. The same Info Window will be used for all markers.&lt;/p&gt;
&lt;span class=&quot;artigos-rel-title&quot;&gt;Related articles:&lt;/span&gt;&lt;br /&gt;
&lt;ul class=&quot;artigos-rel&quot;&gt;
&lt;li&gt;&lt;a href=&quot;http://en.marnoto.com/2014/09/5-formas-de-personalizar-infowindow.html&quot; target=&quot;_blank&quot;&gt;5 ways to customize the Google Maps InfoWindow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/create-new-infowindow/example.html&quot; target=&quot;_blank&quot; title=&quot;Example of a simple Info Window&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/create_new_infowindow.zip&quot; title=&quot;create_new_infowindow.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;
How to Create an Info Window&lt;/h3&gt;
&lt;p&gt;Creating an Info Window for a single marker is fairly simple and meets the following requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Content&lt;/b&gt; - can be simple text or HTML&lt;br /&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;var content = &#39;&amp;lt;div id=&quot;iw_container&quot;&amp;gt;&#39; +
      &#39;&amp;lt;div class=&quot;iw_title&quot;&amp;gt;Maritime Museum of Ílhavo&amp;lt;/div&amp;gt;&#39; +
      &#39;&amp;lt;div class=&quot;iw_content&quot;&amp;gt;Visit the cod aquarium at the Maritime Museum of Ílhavo.&amp;lt;/div&amp;gt;&#39; &lt;complete id=&quot;goog_1513151441&quot;&gt;+&lt;/complete&gt;
   &#39;&amp;lt;/div&amp;gt;&#39;;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Create the new Info Window&lt;/b&gt; with API’s &lt;i&gt;&lt;b&gt;new google.maps.InfoWindow()&lt;/b&gt;&lt;/i&gt; constructor, and simultaneously instruct the Info Window must search for its content on the variable &lt;i&gt;&lt;b&gt;content&lt;/b&gt;&lt;/i&gt; previously defined&lt;br /&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;var infowindow = new google.maps.InfoWindow({
   content: content
});
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Open the Info Window&lt;/b&gt; using an API function that detects a click on the corresponding marker and opens the InfoWindow.&lt;br /&gt;The function &lt;b&gt;&lt;i&gt;google.maps.event.addListener(&amp;lt;marker&amp;gt;, &amp;lt;event&amp;gt;, &amp;lt;action&amp;gt;)&lt;/i&gt;&lt;/b&gt;&amp;nbsp;is always alert waiting for a click (in this example the &amp;lt;event&amp;gt; is a click) on the marker &amp;lt;marker&amp;gt; (in this example only one marker is defined on the map), to run an action &amp;lt;action&amp;gt; The action on this example is a function that makes a call to the API &lt;b&gt;&lt;i&gt;(infowindow.open(&amp;lt;map&amp;gt;,&amp;lt;marker&amp;gt;)&lt;/i&gt;&lt;/b&gt; and asks the Info Window - defined with the variable infowindow - to be open (&amp;nbsp;&lt;i&gt;.open() )&lt;/i&gt; on the map defined on &lt;i&gt;map&lt;/i&gt;&amp;nbsp;, which coordinates must be the same as the marker, defined in &lt;i&gt;marker&lt;/i&gt;.&lt;br /&gt;If the previous procedures seemed difficult, the next example will show how it’s actually really simple to open an Info Window in the corresponding marker.&lt;br /&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;google.maps.event.addListener(marker, &#39;click&#39;, function() {
   infowindow.open(map,marker);
});
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The API inserts a link ( x ) on the top right so that the user can close the Info Window. Additionally a new event can be inserted - &lt;i&gt;&lt;b&gt;infowindow.close()&lt;/b&gt;&lt;/i&gt; - that closes the Info Window with a click on the map.&lt;br /&gt;
As the following example shows, this time the API is instructed to wait for a click on the map and, when that happens, closes the Info Window.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;  // event to close the infoWindow with a click on the map
  google.maps.event.addListener(map, &#39;click&#39;, function() {
    infowindow.close();
  });&lt;/pre&gt;
&lt;p&gt;All together now!&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;var ilhavo = new google.maps.LatLng(40.604036,-8.665247);
var museum = new google.maps.LatLng(40.604382,-8.665983);

function initialize() {
   var mapOptions = {
      center: ilhavo,
      zoom: 18,
      mapTypeId: google.maps.MapTypeId.SATELLITE
   };

   var map = new google.maps.Map(document.getElementById(&quot;map-canvas&quot;),mapOptions);

   // variable to define the content of Info Window
   var content = &#39;&amp;lt;div id=&quot;iw_container&quot;&amp;gt;&#39; +
                  &#39;&amp;lt;div class=&quot;iw_title&quot;&amp;gt;Maritime Museum of Ílhavo&amp;lt;/div&amp;gt;&#39; +
                  &#39;&amp;lt;div class=&quot;iw_content&quot;&amp;gt;Visit the cod aquarium at the Maritime Museum of Ílhavo.&amp;lt;/div&amp;gt;&#39; +
                  &#39;&amp;lt;/div&amp;gt;&#39;;

   // creates the new Info Window with reference to the variable infowindow and establishes the content
   var infowindow = new google.maps.InfoWindow({
      content: content
   });

   // variable to define the option of the marker
   var marker = new google.maps.Marker({
      position: museum, // variable with the coordinates Lat and Lng
      map: map,
      title:&quot;Maritime Museum of Ílhavo&quot;
   });

   // procedure to show the Info Window using a click on the marker
   google.maps.event.addListener(marker, &#39;click&#39;, function() {
      infowindow.open(map,marker); //map and marker are the variables defined previously
   });

  // event to close the infoWindow with a click on the map
  google.maps.event.addListener(map, &#39;click&#39;, function() {
    infowindow.close();
  });
}
google.maps.event.addDomListener(window, &#39;load&#39;, initialize);
&lt;/pre&gt;
&lt;span class=&quot;linkExemplos btndemo&quot;&gt;&lt;a class=&quot;btndemo&quot; href=&quot;http://maps.marnoto.com/en/create-new-infowindow/example.html&quot; target=&quot;_blank&quot; title=&quot;Example of a simple Info Window&quot;&gt;View example&lt;/a&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
This example shows how to add a simple Info Window with HTML content. The Info Window can also accommodate links, images and forms.&lt;br /&gt;
All are welcome to share doubts and comments. Use the comment box so that all can share the info and the knowledge.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;div class=&quot;blockQuoteTitle&quot;&gt;
CURIOSITY&lt;/div&gt;
The Maritime Museum of Ílhavo inaugurated in 2013 is the first Cod Aquarium in the country.&lt;br /&gt;&lt;a href=&quot;http://www.museumaritimo.cm-ilhavo.pt/&quot; target=&quot;_blank&quot;&gt;Museu Marítimo de Ílhavo&lt;/a&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/create_new_infowindow.zip&quot;&gt;create_new_infowindow.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/5961662871411202037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2013/09/info-window-on-gogle-maps-api.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/5961662871411202037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/5961662871411202037'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2013/09/info-window-on-gogle-maps-api.html' title='Info Window on Google Maps API JavaScript v3'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_fn71nCFslmoOJsUiUckrcwuu6QP7rmS2QmklYEeuHhp2Oz6imZbusB0IQwq1krcTKsAQMbr-cgKQQGhCV8a78EegFMykBAmH4V3AGb8a0LoidN5cPl0hJqQduaLOTB2DaLl7kTE26PY/s72-c/infowindowmuseu2.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-4824017513843705013</id><published>2013-09-24T10:12:00.000+01:00</published><updated>2015-06-26T10:16:23.581+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><category scheme="http://www.blogger.com/atom/ns#" term="Markers"/><title type='text'>Add a marker with Google Maps JavaScript API v3</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqNT75qJY0MHy5XmleZtr0BNB0uz6x87C0t20SUM4FvWZb0wMLPhgukv6jnkS-StyyMRRnHSHssATSFEoaAdjo7Gaw2ce_J9cttXLbPMcFNc16kYRMs05szQI2z5TyNSEGGbaHm-Vpeg/s1600/markerfarol.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img itemprop=&quot;image&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqNT75qJY0MHy5XmleZtr0BNB0uz6x87C0t20SUM4FvWZb0wMLPhgukv6jnkS-StyyMRRnHSHssATSFEoaAdjo7Gaw2ce_J9cttXLbPMcFNc16kYRMs05szQI2z5TyNSEGGbaHm-Vpeg/s1600/markerfarol.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Markers are simple icons that point the position of a particular location on a map.&lt;br /&gt;
We have already seen how to &lt;a href=&quot;http://en.marnoto.com/2013/09/como-criar-um-mapa-com-google-maps-api.html&quot; target=&quot;_blank&quot;&gt;embed a map&lt;/a&gt; on a webpage.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; &lt;span itemprop=&quot;description&quot;&gt;In this tutorial I will explain how to add a marker and how to use a custom icon, replacing the standard image from Google Maps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You may be interested in &lt;a href=&quot;http://en.marnoto.com/2015/02/rapido-e-simples-partilhar-um-mapa.html&quot;&gt;Quick and simple sharing a location with Google Maps&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/add-marker/example.html&quot; target=&quot;_blank&quot; title=&quot;Example of a simple marker with Google Maps API&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/addmarker.zip&quot;  title=&quot;addmarker.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;To add a marker on a map we have to make use of &lt;i&gt;&lt;b&gt;google.maps.Marker&lt;/b&gt;&lt;/i&gt; constructor and set specific marker options.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt; // map center coordinates
 var barraBeach = new google.maps.LatLng(40.640416,-8.749541);

 // marker coordinates
 var lighthouseAveiro = new google.maps.LatLng(40.642851,-8.747596);

 function initialize() {
   var mapOptions = {
      center: barraBeach, // map center coordinates
      zoom: 15,
      mapTypeId: google.maps.MapTypeId.SATELLITE
   };
   var map = new google.maps.Map(document.getElementById(&quot;map-canvas&quot;),
 mapOptions);
   
   // marker options
   var marker = new google.maps.Marker({
      position: lighthouseAveiro, // marker coordinates
      map: map,
      title:&quot;Lighthouse of Aveiro&quot;
  });
}
google.maps.event.addDomListener(window, &#39;load&#39;, initialize);&lt;/pre&gt;
&lt;p&gt;To add a simple marker on the map requires adding a new variable to the &lt;i&gt;&lt;b&gt;initialize()&lt;/b&gt;&lt;/i&gt; function, which is designated by &lt;i&gt;&lt;b&gt;marker&lt;/b&gt;&lt;/i&gt;.The variable &lt;i&gt;&lt;b&gt;marker&lt;/b&gt;&lt;/i&gt; makes a call to the &lt;i&gt;&lt;b&gt;google.maps.Marker&lt;/b&gt;&lt;/i&gt; constructor and sets custom properties values: &lt;i&gt;position&lt;/i&gt;, &lt;i&gt;map&lt;/i&gt; e &lt;i&gt;title&lt;/i&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;position&lt;/b&gt; - values of latitude and longitude of the marker. The global variable &lt;b&gt;&lt;i&gt;lighthouseAveiro&lt;/i&gt;&lt;/b&gt; defines latitude and longitude coordinates for this marker. Those values have to be passed through the &lt;b&gt;&lt;i&gt;google.maps.LatLng()&lt;/i&gt;&lt;/b&gt; constructor. This class creates a LatLng object representing a geographic point.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;map&lt;/b&gt; - in this case the marker is added to the existing single map defined by the variable &lt;i&gt;map&lt;/i&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;title&lt;/b&gt; - The title of the marker is visible when the mouse cursor is placed over the marker.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Changing the image of a Google Maps marker with API v3&lt;/h3&gt;
&lt;p&gt;The previous example adds a marker on the map with the standard image from Google Maps but there is an option that allows you to use custom images.&lt;br /&gt;
The &lt;b&gt;&lt;i&gt;icon&lt;/i&gt;&lt;/b&gt; option allows you to set a URL to the intended image.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt; ...

 // variable that sets the URL to the new image
   var myImage = &#39;images/lighthouse.png&#39;;
 
 // variável que define as opções do marcador
   var marker = new google.maps.Marker({
      position: lighthouseAveiro,
      map: map,
      title:&quot;Lighthouse of Aveiro&quot;,
      icon: myImage // set new image
  });
}
google.maps.event.addDomListener(window, &#39;load&#39;, initialize);&lt;/pre&gt;
&lt;p&gt;The API automatically resizes the image to use as a marker. However it is advisable to use images with a width of 20px and height of 32px. To use the standard Google Maps icon just remove the option &lt;i&gt;icon: myImage&lt;/i&gt;.&lt;/p&gt;
&lt;span class=&quot;linkExemplos&quot;&gt;&lt;a class=&quot;btndemo&quot; href=&quot;http://maps.marnoto.com/en/add-marker/example.html&quot; target=&quot;_blank&quot;&gt;View example&lt;/a&gt;&lt;/span&gt;
&lt;p&gt;Free icons to use in Google Maps: &lt;a href=&quot;http://mapicons.nicolasmollet.com/&quot;&gt;http://mapicons.nicolasmollet.com&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class=&quot;blockQuoteTitle&quot;&gt;
CURIOSITY&lt;/div&gt;
The Lighthouse of Aveiro  is located at Barra beach, county of Ílhavo, with 62m high, is the tallest lighthouse in Portugal and the second highest in the Iberian Peninsula.&lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/addmarker.zip&quot; title=&quot;addmarker.zip&quot;&gt;addmarker.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;All are welcome to share doubts and comments. Use the comment box so that all can share the info and the knowledge.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/4824017513843705013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2013/09/adicionar-um-marcador-com-google-maps.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/4824017513843705013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/4824017513843705013'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2013/09/adicionar-um-marcador-com-google-maps.html' title='Add a marker with Google Maps JavaScript API v3'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqNT75qJY0MHy5XmleZtr0BNB0uz6x87C0t20SUM4FvWZb0wMLPhgukv6jnkS-StyyMRRnHSHssATSFEoaAdjo7Gaw2ce_J9cttXLbPMcFNc16kYRMs05szQI2z5TyNSEGGbaHm-Vpeg/s72-c/markerfarol.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1008731406451826004.post-1251659359317631562</id><published>2013-09-23T14:51:00.000+01:00</published><updated>2015-06-26T10:15:46.232+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps API V3"/><title type='text'>How to create a map with Google Maps API v3</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Z5fEMRNCgR0vjDRV7aBJeqCTcjlKO6H4sodhz3gakCGY882LzDc3g7XDlpM19UKlN-kb7eTVZjjZbE4GF5y9myeaK6NNM0hyv-QYZG-AfQkdWrQsV0_FkpWHk-LB-kDvvEhofpHk8tA/s1600/logogmaps.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img itemprop=&quot;image&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Z5fEMRNCgR0vjDRV7aBJeqCTcjlKO6H4sodhz3gakCGY882LzDc3g7XDlpM19UKlN-kb7eTVZjjZbE4GF5y9myeaK6NNM0hyv-QYZG-AfQkdWrQsV0_FkpWHk-LB-kDvvEhofpHk8tA/s1600/logogmaps.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;span itemprop=&quot;description&quot;&gt;The Google Maps JavaScript API v3 allows you to insert a custom map in any website easily and quickly.&lt;/span&gt; Even for those who have few notions of JavaScript, but want to venture in programming languages, this API from Google is quite easy to learn and intuitive.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We begin this tutorial with a brief basic notion of what is necessary to insert a map in a website:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;link for the Google Maps API to be insert into the &amp;lt;head&amp;gt; section of the page
&lt;/li&gt;
&lt;li&gt;the placeholder in the website page to show the map
&lt;/li&gt;
&lt;li&gt;CSS declarations to define the size of the reserved space for the map
&lt;/li&gt;
&lt;li&gt;JavaScript file to set map options&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;btn-demo-down&quot;&gt;
    &lt;p&gt;Before you start this tutorial view a demonstration of the map or download the necessary code.&lt;/p&gt;
    &lt;a class=&quot;btn-down btndemo&quot; href=&quot;http://maps.marnoto.com/en/how-to-create-a-map-Google-Maps-API/example.html&quot; target=&quot;_blank&quot; title=&quot;Example of a simple map with Google Maps API&quot;&gt;&lt;i class=&quot;fa fa-eye&quot;&gt;&lt;/i&gt; DEMO&lt;/a&gt;
    &lt;a class=&quot;btn-down btndown&quot; style=&quot;margin-left: 15px;&quot; href=&quot;http://maps.marnoto.com/en/downloads/How_to_create_GoogleMapsAPI.zip&quot; title=&quot;How_to_create_GoogleMapsAPI.zip&quot;&gt;&lt;i class=&quot;fa fa-download&quot;&gt;&lt;/i&gt; DOWNLOAD&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;
Link to Google Maps API&lt;/h3&gt;
&lt;p&gt;The link to the Google Maps API makes a call to the JavaScript file that will load all map components and should be inserted into the &amp;lt;head&amp;gt; section of the page. In this case a parameter is sent - &lt;b&gt;&amp;sensor=false&lt;/b&gt; - indicating that this map will not make use of location sensors. This parameter is required and accepts the values &lt;i&gt;false&lt;/i&gt; or &lt;i&gt;true&lt;/i&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;HTML /index.html&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-html&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
   &amp;lt;head&amp;gt;
      &amp;lt;script src=&quot;https://maps.googleapis.com/maps/api/js?sensor=false&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;
   &amp;lt;/head&amp;gt;
   &amp;lt;body&amp;gt;
   ...&lt;/pre&gt;
&lt;h3&gt;
Space to display the map&lt;/h3&gt;
&lt;p&gt;The map can be inserted into any section of the page, it’s only necessary to reserve a specific space in the HTML file. Normally we use the &lt;i&gt;&amp;lt;div&amp;gt;&lt;/i&gt; element with an &lt;i&gt;id=&quot;map-canvas&quot;&lt;/i&gt;.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;HTML /index.html&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-html&quot;&gt;&amp;lt;body&amp;gt;
   &amp;lt;div id=&quot;map-canvas&quot;&amp;gt;&amp;lt;/div&amp;gt;
   ...&lt;/pre&gt;
&lt;h3&gt;
The size of the map&lt;/h3&gt;
&lt;p&gt;The map size is defined by css rules and the height is the only required declaration. If you don&#39;t set a specific height, the &amp;lt;div id=&quot;map-canvas&quot;&amp;gt; does not expand and the map is not displayed.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;#map-canvas {
   width: 400px;
   height: 400px;
}&lt;/pre&gt;
&lt;p&gt;The previous example defines a width of 400px, but this value is optional. The measures can also be defined in percentages.
The following code shows a full screen map.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;CSS /style.css&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-css&quot;&gt;html {
   height: 100%;
}
body {
   height: 100%;
   margin: 0;
   padding: 0;
}
#map-canvas {
   height: 100%;
}&lt;/pre&gt;
&lt;h3&gt;
Customize the map&lt;/h3&gt;
&lt;p&gt;Our map options are declared in a JavaScript file as follows.&lt;/p&gt;
&lt;div class=&quot;mm-pre&quot;&gt;&lt;span class=&quot;left-pre&quot;&gt;JavaScript /map.js&lt;/span&gt;&lt;span class=&quot;right-pre&quot;&gt;en.marnoto.com&lt;/span&gt;&lt;div style=&quot;clear: both&quot;&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre class=&quot;prettyprint lang-js&quot;&gt;function initialize() {
   var mapOptions = {
      center: new google.maps.LatLng(40.680898,-8.684059),
      zoom: 11,
      mapTypeId: google.maps.MapTypeId.ROADMAP
   };
   var map = new google.maps.Map(document.getElementById(&quot;map-canvas&quot;),
 mapOptions);
}
google.maps.event.addDomListener(window, &#39;load&#39;, initialize);&lt;/pre&gt;
&lt;p&gt;The function &lt;i&gt;&lt;b&gt;initialize()&lt;/b&gt;&lt;/i&gt; contains two variables &lt;i&gt;&lt;b&gt;mapOptions&lt;/b&gt;&lt;/i&gt; and &lt;i&gt;&lt;b&gt;map&lt;/b&gt;&lt;/i&gt;. The first variable defines some map options in its initialization phase. The second variable indicates the API where it should insert the map and it references the variable that contains the initial options.
The options defined in this example are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;center: new google.maps.LatLng(&lt;span style=&quot;color: orange;&quot;&gt;40.680898,-8.684059&lt;/span&gt;)&lt;/b&gt;
&lt;br /&gt;in brackets we set Latitude and Longitude coordinates to define the center of the map&lt;/li&gt;
&lt;li&gt;&lt;b&gt;zoom: 11&lt;/b&gt;&lt;br /&gt;this option sets the desired zoom level, it ranges between 0 and 21. With a higher value we get a more detailed map. The coverage area of the map is a relation between the size of the space reserved for the map and the zoom value. A higher zoom level is equal to a smaller coverage area.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;mapTypeId: google.maps.MapTypeId.ROADMAP&lt;/b&gt;&lt;br /&gt;&lt;i&gt;mapTypeID&lt;/i&gt; defines what type of map shown on startup. This parameter does not restrict the type of map, the user can change it later.&lt;br /&gt;Map Types:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;ROADMAP (usual 2D map)&lt;/li&gt;
&lt;li&gt;SATELLITE (aerial photo images)&lt;/li&gt;
&lt;li&gt;HYBRID (aerial photography with overlapping streets and other information)&lt;/li&gt;
&lt;li&gt;TERRAIN (map in 3D mode with terrain information)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;p&gt;The variable &lt;i&gt;&lt;b&gt;var map =&lt;/b&gt;&lt;/i&gt; makes a call to the API and passes two parameters&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;document.getElementById(&quot;map-canvas&quot;)&lt;/i&gt;&lt;/b&gt; indicates the space where the map should be displayed&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;mapOptions&lt;/i&gt;&lt;/b&gt; sends the options defined early&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally the function &lt;i&gt;&lt;b&gt;initialize()&lt;/b&gt;&lt;/i&gt; is initiated trough a listener of the API, the &lt;i&gt;&lt;b&gt;addDomListener&lt;/b&gt;&lt;/i&gt;. So, after the page has fully loaded, the event &lt;i&gt;&lt;b&gt;&quot;load&quot;&lt;/b&gt;&lt;/i&gt; occurs in the element &lt;i&gt;&lt;b&gt;window&lt;/b&gt;&lt;/i&gt;, the function &lt;i&gt;&lt;b&gt;initialize()&lt;/b&gt;&lt;/i&gt; is called and the map appears on the page.&lt;/p&gt;
&lt;span class=&quot;linkExemplos&quot;&gt;&lt;a class=&quot;btndemo&quot; href=&quot;http://maps.marnoto.com/en/how-to-create-a-map-Google-Maps-API/example.html&quot; target=&quot;_blank&quot;&gt;View example.&lt;/a&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3&gt;
Google Maps Coordinates&lt;/h3&gt;
&lt;p&gt;Coordinates specified in &lt;i&gt;&lt;b&gt;google.maps.LatLng()&lt;/b&gt;&lt;/i&gt; are specific coordinates of the API and can be found as follows.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href=&quot;http://maps.google.com/&quot;&gt;http://maps.google.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Find the desired location&lt;/li&gt;
&lt;li&gt;Click with the right button at the desired location and choose &lt;b&gt;&quot;What’s here?&quot;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;In the search box (top-left) will apear the location coordinates. These are the values ​​that should be used&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;ads_content&quot;&gt;
 &lt;span class=&quot;ads_content_center&quot;&gt;
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- 336x280_en_marnoto_inposts_0502215 --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:336px;height:280px&quot;
       data-ad-client=&quot;ca-pub-0362839059472765&quot;
       data-ad-slot=&quot;7918798340&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
 &lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;download-files&quot;&gt;
&lt;div class=&quot;download-files-title&quot;&gt;
Download the necessary files for this example&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;btndown&quot; href=&quot;http://maps.marnoto.com/en/downloads/How_to_create_GoogleMapsAPI.zip&quot;&gt;How_to_create_GoogleMapsAPI.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;All are welcome to share doubts and comments. Use the comment box so that all can share the info and the knowledge.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://en.marnoto.com/feeds/1251659359317631562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://en.marnoto.com/2013/09/como-criar-um-mapa-com-google-maps-api.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/1251659359317631562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1008731406451826004/posts/default/1251659359317631562'/><link rel='alternate' type='text/html' href='http://en.marnoto.com/2013/09/como-criar-um-mapa-com-google-maps-api.html' title='How to create a map with Google Maps API v3'/><author><name>Miguel Marnoto</name><uri>http://www.blogger.com/profile/08168845698852902239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Z5fEMRNCgR0vjDRV7aBJeqCTcjlKO6H4sodhz3gakCGY882LzDc3g7XDlpM19UKlN-kb7eTVZjjZbE4GF5y9myeaK6NNM0hyv-QYZG-AfQkdWrQsV0_FkpWHk-LB-kDvvEhofpHk8tA/s72-c/logogmaps.jpg" height="72" width="72"/><thr:total>1</thr:total></entry></feed>