Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you are sending request from php the request will sent from you server IP and the google allows limited request for single ip, so it's better to send request from user's IP. You can do it by using below JavaScript function.</p> <pre><code>function display_map(address_str,business_name,phone_number,google_local_pages){ var address = address_str; // Create a new Geocoder var geocoder = new google.maps.Geocoder(); // Locate the address using the Geocoder. geocoder.geocode( { "address": address }, function(results, status) { // If the Geocoding was successful if (status == google.maps.GeocoderStatus.OK) { var latlang = results[0].geometry.location; // alert(latlang); // Create a Google Map at the latitude/longitude returned by the Geocoder. var myOptions = { zoom: 16, center: results[0].geometry.location, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map"), myOptions); // Add a marker at the address. var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); // var data = "&lt;div id='top'&gt;&lt;span&gt;"+business_name+"&lt;/span&gt;&lt;a href='"+google_local_pages+"'&gt;More Info&lt;/a&gt;&lt;div id='address'&gt;"+address_str+"&lt;/div&gt;&lt;/div&gt;"; var infowindow = new google.maps.InfoWindow({ content: "&lt;div id='top' style='height:175px;width:200px;'&gt;&lt;span id='bname' style='font-size: 1.3em;font-weight:bold;'&gt;"+business_name+':'+"&lt;/span&gt;&lt;a style='text-decoration: none;' target='_blank' href='"+google_local_pages+"'&gt;More Info&lt;/a&gt;&lt;hr/&gt;&lt;div id='address' style='font-size: 1em;font-weight:normal;align:left'&gt;"+address_str+"&lt;/div&gt;&lt;hr/&gt;&lt;div id='lower'&gt;&lt;a style='text-decoration: none;' target='blank' href='http://maps.google.com/maps?saddr=&amp;daddr="+address_str+"'"+"&gt;Directions&lt;/a&gt;&amp;emsp;&lt;a style='text-decoration: none;' href='javascript:void(0);' onclick='showform();'&gt;Search Nearby&lt;/a&gt;&lt;div style='display:none;' id='hiddenForm'&gt;&lt;hr&gt;&lt;span style='font-size: 1em;font-weight:bold;'&gt;Search Nearby:&lt;/span&gt;&lt;form action='http://maps.google.com/maps' method='get' target='_blank'&gt;&lt;input type='text' name='q' id='q' value='' size='12' /&gt;&lt;input type='submit' value='GO'/&gt;&amp;emsp;&lt;span phv='&amp;quot;%1$s&amp;quot;' style='font-size: 0.7em;font-weight: small;'&gt;e.g.,&amp;ldquo;pizza&amp;ldquo;&lt;/span&gt;&lt;input type='hidden' name='near' value='"+address_str+"'/&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;" }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map, marker); }); } else { try { console.error("Geocode was not successful for the following reason: " + status); } catch(e) {} } }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload