Convert A Postcode Or Address To Latitude and Longitude

You can use this to generate the Latitude and Longitude For The Postcode To Destination Example


latitude: longitude:
  <!doctype html>
  <meta charset="UTF-8">
  <title>Postcode to latitudea and longitude </title>
  <script type='text/javascript'>//<![CDATA[ 
  $(function () {
  var lat = 44.88623409320778,
  lng = -87.86480712897173,
  latlng = new google.maps.LatLng(lat, lng),
  image = '';
  //zoomControl: true,
  //zoomControlOptions: google.maps.ZoomControlStyle.LARGE,
  var mapOptions = {
  center: new google.maps.LatLng(lat, lng),
  zoom: 13,
  mapTypeId: google.maps.MapTypeId.ROADMAP,
  panControl: true,
  panControlOptions: {
  position: google.maps.ControlPosition.TOP_RIGHT
  zoomControl: true,
  zoomControlOptions: {
  style: google.maps.ZoomControlStyle.LARGE,
  position: google.maps.ControlPosition.TOP_left
  map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions),
  marker = new google.maps.Marker({
  position: latlng,
  map: map,
  icon: image
  var input = document.getElementById('searchTextField');
  var autocomplete = new google.maps.places.Autocomplete(input, {
  types: ["geocode"]
  autocomplete.bindTo('bounds', map);
  var infowindow = new google.maps.InfoWindow();
  google.maps.event.addListener(autocomplete, 'place_changed', function (event) {
  var place = autocomplete.getPlace();
  if (place.geometry.viewport) {
  } else {
  moveMarker(, place.geometry.location);
  google.maps.event.addListener(map, 'click', function (event) {
  $("#searchTextField").focusin(function () {
  $(document).keypress(function (e) {
  if (e.which == 13) {
  return false;
  var firstResult = $(".pac-container .pac-item:first").text();
  var geocoder = new google.maps.Geocoder();
  "address": firstResult
  }, function (results, status) {
  if (status == google.maps.GeocoderStatus.OK) {
  var lat = results[0],
  lng = results[0].geometry.location.lng(),
  placeName = results[0].address_components[0].long_name,
  latlng = new google.maps.LatLng(lat, lng);
  moveMarker(placeName, latlng);
  function moveMarker(placeName, latlng) {
  //, marker);
  <script src=""></script>
  <input id="searchTextField" type="text" size="50" style="text-align: left;width:357px;direction: ltr;">
  latitude:<input name="latitude" class="MapLat" value="" type="text" placeholder="Latitude" style="width: 161px;" >
  longitude:<input name="longitude" class="MapLon" value="" type="text" placeholder="Longitude" style="width: 161px;" >
  <div id="map_canvas" style="height: 350px;width: 500px;margin: 0.6em;"></div>

Available For Freelance:

I Am Available To Work For You Freelance, See My Skills To See If I Can Help Your Project, If I Can Help You Then Please Contact Me.

My Rates Start From £180 A Day, Discount Prices For Regular Clients And Work Over 3 Days.

I Started To Learn Web Development In 2008, I Did A Few Open University Courses While Working Full Time In The Building Trade, I Managed To Get A Diploma With Distinction

Request A Tutorial

If You Are Having Difficulty With The Development Of Your Website Or If You Are Just Starting Out Leaning Web Development And You Think I Can Help You Then Request A Tutorial, I Will Do My Best To Help You

I Dont Charge For My Services If I Can Help You With Something That Can Be Be Fixed In A Few Minutes.


If You Would Like To Advertise On This Site Then Please Contact Me, You Will Be Given Login Details To See What Day And Where Clicks Have Come From.

Prices Start From £10 A Month With Discounts Available For 3 Months Or More.

You Can Either Send Me The Banner Advert That You Have Designed Or From £10 I Can Have Designer Design A Banner For You.

Please Leave A Comment And A Rating image 0.00 out of 5 based on 0 ratings. 0 user reviews.

My Skills:

  • PHP 5
  • JavaScript
  • Jquery
  • XHTML Validation
  • KineticJS
  • HTML5
  • CSS - CSS3
  • SEO

My Social Networks:

  • facebook youtube