Search
Clear search
Close search
Google apps
Main menu
; GoogleTimeStamp = Number(myJSON.features[0].properties.timeStamp); latitude = Number(myJSON.features[0].geometry.coordinates[0]); longitude = Number(myJSON.features[0].geometry.coordinates[1]); radius = Number(myJSON.features[0].properties.accuracyInMeters); radiusInKm = radius*1.000/1000; map.setCenter(new GLatLng(longitude, latitude), 13); var bounds = new GLatLngBounds(); function fit(){ map.panTo(bounds.getCenter()); //map.setZoom(16);//map.getBoundsZoomLevel(bounds)); } ////////////////////////// circle/////////////////////////////// function drawCircle(center, radius, nodes, liColor, liWidth, liOpa, fillColor, fillOpa) { //calculating km/degree var latConv = center.distanceFrom(new GLatLng(center.lat()+0.1, center.lng()))/100; var lngConv = center.distanceFrom(new GLatLng(center.lat(), center.lng()+0.1))/100; //Loop var points = []; var step = parseInt(360/nodes)||10; for(var i=0; i<=360; i+=step) { var pint = new GLatLng(center.lat() + (radius/latConv * Math.cos(i * Math.PI/180)), center.lng() + (radius/lngConv * Math.sin(i * Math.PI/180))); points.push(pint); bounds.extend(pint); //this is for fit function } points.push(points[0]); // Closes the circle, thanks Martin fillColor = fillColor||liColor||"#0055ff"; liWidth = liWidth||2; var poly = new GPolygon(points,liColor,liWidth,liOpa,fillColor,fillOpa); map.addOverlay(poly); } //calling circle drawing function function draw(pnt){ map.clearOverlays(); bounds = new GLatLngBounds(); //var givenRad = 1;//document.getElementById("radius").value*1; var givenQuality = 48;//document.getElementById("seqments").value*1; var centre = pnt||map.getCenter() drawCircle(centre, radiusInKm, givenQuality); fit(); } draw(); ///////////////////////////////////////////////////////////////////// //Marker //var jeremy = new GIcon(G_DEFAULT_ICON); var size = new GSize(115,110); var ssize = new GSize(170,120); var jeremy = new GIcon(G_DEFAULT_ICON); jeremy.iconSize=size; jeremy.shadowSize=ssize; var anchorpoint = new GPoint(57,110); jeremy.iconAnchor = anchorpoint;//(map.getCenter(anchorpoint)); jeremy.image = 'images/Jeremy4.gif'; jeremy.shadow = 'images/JeremyShadow4.png'; markerOptions = { icon:jeremy}; var point = new GLatLng(longitude,latitude); map.addOverlay(new GMarker(point, markerOptions)); // var marker = new google.maps.Marker({ // position: latlng, // map: map, // title:"Jeremy is Here!", // icon: jeremy // }); } function GetCity() { // get my JSON var JSON = Google Maps Help
Search
Clear search
Close search
Google apps
Main menu
; document.writeln(JSON.features[0].properties.reverseGeocode); } function GetTime() { var JSON = Google Maps Help
Search
Clear search
Close search
Google apps
Main menu
; GoogleTimeStamp = Number(JSON.features[0].properties.timeStamp); var acu = Number(JSON.features[0].properties.accuracyInMeters); var epoch = Number(JSON.features[0].properties.timeStamp); var myDate = new Date( epoch*1000); document.write("accurate to within "); //document.write(myDate.toLocaleString()); document.write(acu) document.write(" meters as of "); document.write(myDate.toLocaleString()); document.write(""); }

Where is Jeremy right now? At this exact moment...

He's here in