Musings of a Philadelphia Physician who has served the community for six decades

Return to Home

Find your location

Click the button at the top of your browser to allow it to share your location.

Your browser does not support iframes.

Here's the key Javascript/HTML code (thanks to


<script type="text/javascript">
// <![CDATA[

var map;
var geocoder;

function initialize() {
   map = new GMap2(document.getElementById("map_canvas"));
   map.setCenter(new GLatLng(34, 0), 1);
   geocoder = new GClientGeocoder();

if (navigator.geolocation) {
   navigator.geolocation.getCurrentPosition(function(position) {  
	var address = position.coords.latitude+","+position.coords.longitude;
	geocoder.getLocations(address, addAddressToMap);
} else {
  alert("I'm sorry, but geolocation services are not supported by your browser.");

function addAddressToMap(response) {
      if (!response || response.Status.code != 200) {
        alert("Sorry, we were unable to geocode that address");
      } else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],
        marker = new GMarker(point);
        map.setCenter(point, 13);
		var addr = document.getElementById('address'); = place.address;

// ]]>


<body onload="initialize()">

<div id="map_canvas" style="width: 500px; height: 300px"></div>


Please Let Us Know What You Think

(HTML tags provide better formatting)

Because of robot spam we ask you to confirm your comment: we will send you an email containing a link to click. We apologize for this inconvenience but this ensures the quality of the comments. (Your email will not be displayed.)
Thank you.