Can anyone tell me if this is absolutely legal. We would like to use screenshots of our Country and areas of interest to use as a background to plot customer networks and give them access to see the performance of their respective networks (NPM as the customer portal). I am trying to see in the permissions of use on Google's site if it is legal, however I am seeing conflicting pieces of info on their site. Can anyone point out to me where it says that it is legal to put screenshots of their maps on your website (Orion NPM).
The only person qualified to tell you whether a course of action is legal for your organization is your own attorney. Few lawyers would willingly risk their license to practice law by dispensing legal advice on a web forum, and the advice you get from people who aren't lawyers could get you into trouble.
I found a way to do this that give you a live / clickable / rotatable / zoomable Earth with your network object on it.
Make your Google Earth KML with Google Earth. I made a script that polls the status of the nodes I want on the map, and then builds this KML (they're just XML files).
In this example, the KML is saved as YOUR.HTML.
Create a view that has a 'custom html' object in it. Edit that object, and add this code (replace YOURSERVERNAME and YOUR.html to match your system):
<script src="">www.gmodules.com/.../ifr
The script I created can be scheduled, so the node LEDs will be up to date as often as the scriptis run.
Here are some clean screen shots:
Is that script something that is sharable?
I can't because it reveals things about my system and network, but this is how it works...
The KML file can be broken into 3 parts... prefix, suffix and the waypoints/nodes.
I save the prefix and suffix as txt files ahead of time.
I get the status of my target nodes with this SQL command:
Select right(A_CUSTOM_FIELD,3) From Nodes Where Device_Type like 'A_CUSTOM_STRING' and Status not like '1'
I dump the prefix to a new txt, then for loop through the SQL results dumping to the same file, then the suffix.
You can just open that KML with Google Earth too if you want....
Here's something I started some basic work on, written entirely in Javascript. This just uses the google maps API and runs over HTTP. I set it up to work as a basic HTTP resource. It uses an XML report from orion for its data source. Very lightweight, very portable. No client software needed!
Here's the source!!
It's pretty basic. I didn't do much work with it, but the API sort of does work. I wasn't inspired enough to complete the project (I'm not a developer), it was kind of a one-night hobby deal.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps JavaScript API testing! JP Senior</title>
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b> However, it seems JavaScript is either disabled or not supported by your browser. To view Google Maps, enable JavaScript by changing your browser options, and then try again. </noscript>
<!-- Load the API with our key from google.com --> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAA698J2b_5QdYdKSIKHxw2PxQCO9sfQ_Giw1tTCtQ-pmdD2Jo3kxRVcYLWSLe1H4M6fsGQypEQ62zvFQ" type="text/javascript"></script> <body onunload="GUnload()">
<!-- Use capital L! onload() is reserved in firefox -JP --> <table border=1> <tr> <td> <div id="map_canvas" style="width: 500px; height:300px"></div> </td> </tr> <tr> <td valign="top" style="text-decoration: underline; color: #4444ff;"> <div id="side_bar" style="overflow:auto; height:100px;"></div> </td> </tr> </table>
<!-- Break out the map code, it's a little easier this way --> <script type="text/javascript"> //<![CDATA[ var map; var geocoder; var gmarkers = []; var side_bar_html = ""; var i = 0; var sites = new Array();
sites[0] = "Somesite somestreet, Calgary, Alberta"; sites[1] = "555 main street, Vancouver British Columbia"; sites[2] = "950 Oak, Sometown, Ontario";
function drawpoints() { geocoder = new GClientGeocoder(); <!-- Loop through each of our sites... --> for (i=0; i < sites.length; i++) { //geocoder.getLocations(sites, addAddressToMap, sites); }}//Redefine our own click... function myclick(i) { GEvent.trigger(gmarkers, "click"); map.setZoom(10); }
// A function to create the marker and set up the event window function createMarker(point,name,html) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); GEvent.addListener(marker,"dblclick", function() { //Center on marker map.panTo(point); //Zoom in! map.setZoom(10); }); // save the info we need to use later for the side_bar gmarkers.push(marker); // add a line to the side_bar html side_bar_html += '<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a><br>'; document.getElementById("side_bar").innerHTML = side_bar_html; return marker; }
function addAddressToMap(response) { if (!response || response.Status.code != 200) { //alert("Sorry, we were unable to geocode that address: " + response); } else { place = response.Placemark[0]; point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); marker = new GMarker(point); marker = createMarker(point,place.address, '<b>Address:</b>' + place.address + '<br />' + '<b>Postal Code:</b>' + place); map.addOverlay(marker); }}//OK let's draw the map now map = new GMap2(document.getElementById("map_canvas")); <!-- Center it somewhere around Sasketchewan, so we can see all of Canada --> map.setCenter(new GLatLng(57,-95), 3); map.addControl(new GLargeMapControl); map.addControl(new GMapTypeControl);
//We like to use the mousewheel for zooming map.enableScrollWheelZoom();
drawpoints();
//OK now that was fun, let's try a test sql report! var request = GXmlHttp.create(); request.open("GET", "NetPerfMon/Report.asp?Report=Unique%5FAddresses&dataformat=xml", true); request.onreadystatechange = function() { if (request.readystate == 4) { var xmlDoc = request.responseXML; //alert('xml loaded'); var Report = xmlDoc.documentElement.getElementsByTagName("Record"); for (var x = 0; x < Report.length; x++) { var StreetAddress=Report[x].getAttribute("StreetAddress"); var City=Report[x].getAttribute("City"); var Province=Report[x].getAttribute("Province"); //Only continue if all three REQUIRED attributes are present! if (StreetAddress && City && Province) { var Search=StreetAddress + ", " + City + " " + Province; geocoder.getLocations(Search, addAddressToMap, Search);; } } } }request.send(null); </script></body></html>
"No client software needed!" - That's a good point - my Google Earth solution prompts you to install the Google Earth Plugin if you don't have it installed already...
jp, can you share how the report is setup?
It's a device inventory report that just includes all of the new fields we set up - very simple stuff... It's a flat XML file and not very complicated at all. As long as the fields exist, the XML will be read.
The Javascript I shared above -^ didn't actually loop through the XML so much yet, and was horribly messy. I'm not a developer - I'm a network nerd, so it was more of a midnight project I did while I was waiting for some jobs to finish.