Friday 30 June 2017

How to display address on google map using Google Maps Embed API in php

How to display address on google map using Google Maps Embed API in php

<?php
$address = "Okhala phase 2 new delhi";
$address = str_replace(" ","+", $address);
?>
<iframe
  width="100%"
  height="400"
  frameborder="0" style="border:0"
  src="https://www.google.com/maps/embed/v1/place?key=YOUR_API_KEY
    &q=<?= $address ?>">
</iframe>

No comments:

Post a Comment