google maps embed html code example

Example 1: how to embed an image in html

<img src="file.jpeg" width="200px" height="200px"> <!-- for images that are saved in the same folder as the HTML document -->
<img src="/media/USB/image.jpeg" width="200px" height = "200px" > <!-- the image source will vary by folder, which you can find the locations on the folder NAV on the top of your screen -->

Example 2: get directions google maps html

//saddr = blank input field for entering START address
//daddr = hard-coded END address
//Enter an address and press button and a popup window opens with directions.
//Enter no address, and just a map of the END address opens.
//in angular add ngNoForm attribute in form tag and method as GET

<form action="http://maps.google.com/maps" method="get" target="_blank">
   <label for="saddr">Enter your location</label>
   <input type="text" name="saddr" />
   <input type="hidden" name="daddr" value="350 5th Ave New York, NY 10018 (Empire State Building)" />
   <input type="submit" value="Get directions" />
</form>

Tags:

Html Example