The first thing you probably want to do is get the latitude and longitude of the contact address. You can either access the geoCode api, or do it in real time or get it and save it in the database when you first create a new contact. I highly recommend it later, and you'll save a ton of headaches if you don't need to look for geoCode to find each page.
Then attach your latitude and longitude to the ViewModel so that you can work with these values in your view. Set latitude and longitude to a couple of javascript variables and you will go well.
Take a look at the “hello world” for google maps api and you should have all the information you need. Just set the parameters for what you want and use your latitude and longitude.
You can’t do much with jQuery here, as you will mainly use the Google api. The only real advantage would probably be to put things in $ (funcion () {... so you don’t have to execute the function on the body of onload = ...
source share