才等录920may的时候,h5页面调用微信js录音显示wwW920may空白是咋回事

Google Maps Find Altitude
Google Maps Find Altitude
Determine the altitude (elevation) when a point is tapped/clicked on a map
Drop Marker?
[Map Height :
Output latitude,longitude?
Output in meters?
Output in feet?
Output Distance?
Draw line between the markers?
Upload and Plot Addresses
Paste one address per line then click [Load]. There is a limit of 100 rows per batch. Any additional rows will be ignored.
Description
Use a map to determining altitude (elevation) when a point is tapped/clicked on a map. You can click/tap ad many times as required to find the elevation of multiple points.
How To Use
Click on the map on a location where you wish to find the altitude
The altitude will be displayed in the message box below the map and when you hover over the marker
You can click to place more than one marker and return to hover over each in order to find out the altitude again
Click the [Clear Map] button in order to remove all markers and start again
Use the search option to find a place
Click on a marker to remove it
You can also access a CSV list of latitude, longitude, altitude in meters and altitude in feet for every marker you place on the map.
Future Updates and Ideas
Output in location in UTM Grid coordinates
How it Works
var output_lat =new Array(0);
var output_lng =new Array(0);
var output_f =new Array(0);
var output_m =new Array(0);
var outputDiv=document.getElementById('outputDiv');
var routeMarkers=new Array(0);
var routePoints=new Array(0);
var addresslimit=100;
var bool_toggle_draw_line=
var lineWidth=1;
var lineColor='#ff0066';
var routeP
function initialize()
var latlng = new google.maps.LatLng(0,0);
//setCursor:'crosshair'
var myOptions = {zoom:1,center:latlng,mapTypeId:google.maps.MapTypeId.ROADMAP,draggableCursor:'crosshair',mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},scaleControl:true};
map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
// Create ElevationService
elevator = new google.maps.ElevationService();
// Add a listener for the click event and call getElevation on that location
google.maps.event.addListener(map, 'click', mapclickedevent);
geocoder = new google.maps.Geocoder();
latlngbounds = new google.maps.LatLngBounds();
function foundsingle(first)
var latlng = new google.maps.LatLng (parseFloat(first.lat),parseFloat(first.lng));
var obj=new Object();
obj.latLng=
getElevation(obj);
function mapclickedevent(event)
getElevation(event.latLng);
function getElevation(clickedLocation)
var locations = [];
locations.push(clickedLocation);
// Create a LocationElevationRequest object using the array's one value
var positionalRequest = {'locations': locations};
// Initiate the location request
elevator.getElevationForLocations(positionalRequest, function(results, status)
if (status == google.maps.ElevationStatus.OK)
// Retrieve the first result
if (results[0])
// Open an info window indicating the elevation at the clicked position
outputDiv.innerHTML= "Last point clicked : " + results[0].elevation.toFixed(3) + " m / " + (results[0].elevation*3.2808399).toFixed(3) + " feet";
//add the marker
var marker=placeMarker(clickedLocation,results[0].elevation.toFixed(3) + " m / " + (results[0].elevation*3.2808399).toFixed(3) + " feet");
marker.setMap(map);
addCloseEvent(marker,routeMarkers.length);
routeMarkers.push(marker);
ftn_drawline();
latlngbounds.extend(clickedLocation);
output_lat.push(clickedLocation.lat());
output_lng.push(clickedLocation.lng());
output_f.push((results[0].elevation*3.2808399).toFixed(3));
output_m.push(results[0].elevation.toFixed(3));
ftn_makecsv();
outputDiv.innerHTML="No results found";
outputDiv.innerHTML="Elevation service failed due to: " +
function addCloseEvent(marker,index) {
marker.addListener('click', function() {
marker.setMap(null);
if (routeMarkers.length > 1)
ftn_drawline();
//hide the polyline
if (routePath)
routePath.setMap(null);
ftn_makecsv();
function placeMarker(location,text)
var image = 'images/gmmarkersv3/stripes.png';
var marker = new google.maps.Marker({position:location,map:map,icon:image,title:text});
function clearmap()
if (routeMarkers)
for (i in routeMarkers)
routeMarkers[i].setMap(null);
routeMarkers=new Array(0);
if (routePath)
routePath.setMap(null);
outputDiv.innerHTML="";
latlngbounds = new google.maps.LatLngBounds();
output_lat = new Array(0);
output_lng = new Array(0);
output_f = new Array(0);
output_m = new Array(0);
document.getElementById("ta_csvoutput").style.display="none";
document.getElementById("ta_csvoutput").value="";
document.getElementById("goto").value="";
document.getElementById("btn_go").value="Search";
function ftn_makecsv()
document.getElementById("ta_csvoutput").style.display="block";
document.getElementById("ta_csvoutput").value="";
output="number";
if (document.getElementById("cb_output_latlng").checked)
output+=",latitude,longitude";
if (document.getElementById("cb_output_meters").checked)
output+=",meters";
if (document.getElementById("cb_output_feet").checked)
output+=",feet";
if (document.getElementById("cb_output_cumulativedistance").checked)
output+=",cumulative distance (m)";
output+="\n";
var cumulativedistance=0;
for (i in routeMarkers)
if (routeMarkers[i].getMap())
output+=(i + 1);
if (document.getElementById("cb_output_latlng").checked)
output+=","+output_lat[i]+","+output_lng[i];
if (document.getElementById("cb_output_meters").checked)
output+=","+output_m[i];
if (document.getElementById("cb_output_feet").checked)
output+=","+output_f[i];
if (document.getElementById("cb_output_cumulativedistance").checked)
var tmp_cumdist=google.maps.geometry.spherical.computeDistanceBetween(routeMarkers[0].getPosition(), routeMarkers[i].getPosition());
cumulativedistance=parseInt(cumulativedistance) + parseInt(tmp_cumdist.toFixed(0));
output+=","+
output+="\n";
document.getElementById("ta_csvoutput").value=
function submitenter(myfield,e)
if (window.event) keycode = window.event.keyC
else if (e) keycode = e.
if (keycode == 13)
ftn_quickfind(document.getElementById('goto').value);
document.getElementById("goto").focus();
document.getElementById("goto").select();
function ftn_quickfind(address)
document.getElementById("btn_go").value="Searching...";
geocoder.geocode( { 'address': address}, function(results, status)
if (status == google.maps.GeocoderStatus.OK)
var point = results[0].geometry.
if (document.getElementById("cb_dropmarker").checked)
getElevation(point);
map.setCenter(point);
map.fitBounds(results[0].geometry.viewport);
document.getElementById("btn_go").value="Found";
document.getElementById("btn_go").value="Not Found";
//console.log(address);
function ftn_zoomtofit()
map.setCenter(latlngbounds.getCenter());
map.fitBounds(latlngbounds);
function ftn_processaddressupload(str_addresses)
lines = str_addresses.split('\n');
if (lines.length>addresslimit)
lines = lines.slice(0,addresslimit);
nextaddress();
function nextaddress()
if (cnt>=lines.length)
document.getElementById("btn_ok").title="Complete!";
ftn_zoomtofit();
//$.unblockUI();
document.getElementById("btn_ok").title="Processed "+(cnt+1)+"/"+lines.
ftn_geocodeaddress(lines[cnt],getElevation);
function ftn_geocodeaddress(address, callbackFunction)
geocoder.geocode( { 'address': address}, function(results, status)
if (status == google.maps.GeocoderStatus.OK)
var point = results[0].geometry.
callbackFunction(point);
nextaddress();
alert("Address ("+address+")not found!");
nextaddress();
function ftn_toggle_draw_line()
bool_toggle_draw_line=!bool_toggle_draw_
ftn_drawline();
function ftn_drawline()
if (routePath)
routePath.setMap(null);
//rebuild routePoints based on markers location
routePoints=new Array(0);
if (routeMarkers)
for (i in routeMarkers)
if (routeMarkers[i].getMap())
routePoints.push(routeMarkers[i].getPosition());
if ((bool_toggle_draw_line)&&(routePoints.length>1))
routePath=getRoutePath();
routePath.setMap(map);
if (routePath)
routePath.setMap(null);
function getRoutePath()
var routePath = new google.maps.Polyline({
path: routePoints,
strokeColor: lineColor,
strokeOpacity: 1.0,
strokeWeight: lineWidth,
geodesic: true
return routeP
Relevant Links
Version History
Version 1 (28/09/2008)
Version 1.1 (28/12/2008)
Added quick find option
Version 1.2 (21/03/2009)
Enlarged output text at bottom of map
Version 1.3 (04/12/2009)
Output now also displayed in feet
Version 2.0 (10/08/2010)
Implemented
Now uses the
Version 2.1 (11/08/2010)
Added new local search facility
Brought back output in feet
Version 2.2 (17/08/2010)
Added output to CSV option to allow export of latitude, longitude, meters and feet
Version 2.3 (31/08/2011)
Now outputs altitude immediatly from a search
Version 2.4 (07/10/2013)
Added scale control
Version 2.4 (10/11/2013)
Removed Google Local Search API (Deprecated)
Version 3.0 (23/11/2013) - You are here
Added option to Upload and Plot Addresses with their elevation
Version 3.1 (26/10/2015)
New option to draw a line between the markers
Version 3.2 (18/08/2016)
Cumulative distance is now output
Version 3.3 (16/10/2016)
Clicking on an elevation marker now removes it
Share This Page
Share this page with others using one of the methods below. Telling others about Daft Logic is good and we appreciate your support!博主最新文章
博主热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)832被浏览345,577分享邀请回答1.6K164 条评论分享收藏感谢收起1817 条评论分享收藏感谢收起Access denied | autohotkey.com used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (autohotkey.com) has banned your access based on your browser's signature (ee846c8e-ua98).

我要回帖

更多关于 页面相对度多少被收录 的文章

 

随机推荐