Google Maps allows you to display maps on your website,  we can also customize maps, and the information on maps.

The Google Maps API is a JavaScript library. It can be added to a web page with the following script tags:

 

We are creating a div to holds the google map. Here we are also giving an option to search the place on a google map.

 
   
 

then add a DOM listener that will execute the getGoogleMap() function on window load (when the page is initially loaded):

google.maps.event.addDomListener(window, "load", getGoogleMap)
 

In the above example, we are already loading 3 markers in Bangalore, Chennai, Hyderabad.

Then again if a user marks any location, it will display the marker with longitude, latitude of the place(if u want to store) by deleting user previously selecting markers.


We can also set the position description dynamically using the info window

Subscribe To our news letter

Subscribe to our news letter to receive latest blog posts into your inbox. Please fill your email address in the below form.
*We don't provide your email contact details to any third parties
Latest Comments
Related Articles
Preserve file names with sorl for better SEO Ashwin Kumar

We use sorl-thumbnail for scaling images by keeping the original one intact. Sorl proven to be great tool for generating different sized images throughout website. ...

Continue Reading...
Handling Custom Error Pages(404, 500) In Django Nikhila Mergu

404 Page not found and 500 Internal server errors generally occur in every website. When these errors occurs, generally for Django application it will load ...

Continue Reading...
Google plus API integration with django Nikhila Mergu

Using GPlus integration, we can get the user verified email id, general information, friends in a less span of time, and user can also share ...

Continue Reading...