Lines and Polygons Peterson. Simple Line function initialize() { var myLatLng = new google.maps.LatLng(5, -170); var myOptions = { zoom: 2, center: myLatLng,

Slides:



Advertisements
Similar presentations
T-Test Label and list one set of scores in one column List the second set in the second column.
Advertisements

Mapping With Second Site 2 Adding Homesteads & Migrations by David Walker Ottawa TMG Users Group 8 February 2009 by David Walker Ottawa TMG Users Group.
Minitab® 15 Tips and Tricks
Connect Pictometry Online End User
Prepared by : Mahmoud A. Abu Hashish  Used to organize and analyze information  Made up of columns and rows  Columns and rows intersect.
Making maps with Leaflet.js Part II
Google Maps API. Today’s Objectives Get Google Maps working: desktop + mobile Get clustering data complete, data onto a map.
Mapping from a database Peterson. Linux PHP and MySQL were largely developed under Linux – open source operating system based on UNIX Linus Torvalds –
NR 621: Maps on the web Jim Graham Spring Portable Document Format Acrobat Writer lets you write PDF files from virtually any application by “printing”
Google Maps API L. Grewe. Google Maps Largest Mapping API One of the most popular web services Used in many web “mashup” applications Used on many platforms.
Map Layer Mashups Peterson. Overlay of Old Map function initialize() { var newark = new google.maps.LatLng(40.740, ); var imageBounds = new google.maps.LatLngBounds(
Data Tutorial Tutorial on Types of Graphs Used for Data Analysis, Along with How to Enter Them in MS Excel Carryn Bellomo University of Nevada, Las Vegas.
Point Mashups Peterson. Icons Info Marker Random Points.
11 Using the Google Maps API. 2 Objectives You will be able to Use the Google Maps API to display a map of any location on an HTML page. Programatically.
Generation of atlas graphs & charts. Objective The major objective this training session is to equip participants with the knowledge and skills of creating.
Session ID Presented by: Tom Jamate, University of Massachusetts, Amherst April 8, 2013 Session ID 2521 Going Beyond the Address Push-Pin Extending.
Hammond Sanitary District Interactive Web Mapping with Google Maps and Google Apps An Introduction to KML, Google Fusion Tables, and the Google Maps API.
Set 11: Mashups (emphasis on Google tools) IT452 Advanced Web and Internet Systems.
Programming Games Recap on Google Maps. Creating elements. Dynamic creation of elements (multiple video elements). Geolocation. Classwork/Homework: Catch-up.
Graphing Behavioral Data for FBA/BIP Special Services Baldwin County Public Schools.
Programming games Examples: Audio example. Google Maps api. Classwork: show more complex video. Classwork/Homework: Find place (lat and long) for basic.
Google Maps API. Static Maps send an HTTP GET request receive an image (PNG, GIF, JPEG) no javascript needed encode params in URL example:
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
JavaScript Programming B.Ramamurthy 6/113/2014B. Ramamurthy CSE6511.
Programming Games Google Map API examples. CSS. Classwork/homework: Catch up. Upload work. Show your [more] complex Google Maps API example. Plan your.
18 Mapping from a database Mapping in the Cloud Peterson.
How data rule the world Kristoffer Benjaminsson CTO.
Advanced GIS Using ESRI ArcGIS 9.3 3D Analyst part 2.
Programming Games Reprise: storage, datatypes. Geolocation/Google API example. Work session Homework: [Catch up. Upload work. Post proposal.] Work on your.
Q&A TGEL Group 3/2009. SelectorGadget
Session: 19. © Aptech Ltd. 2HTML5 Geolocation and APIs / Session 19  Explain geolocation and its use in HTML5  Explain the Google Maps API  Explain.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
12 Point Mashups Mapping in the Cloud Peterson. Icons.
Self-Discovery Concept: Discovering things about yourself can lead to personal success and satisfaction. Unit Essential Question How Can My Principles,
NR 422: Maps on the web Jim Graham Spring Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data.
NR 422: Maps on the web Jim Graham Spring Computer Networks 2 or more computers connected together Typically a: –Client: requests and receives data.
Creating Interfaces Show form validation examples, Hangman. HTML5 with Google Maps API. Add in localStorage. Design pitfalls. Homework: Make proposal for.
Static Locations, Dynamic Content.
Making Bar Graphs and Scatter Plots in Microsoft Excel 2007.
14 Lines and Polygons Mapping in the Cloud Peterson.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Lesson 12 Spreadsheets Unit 2—Using the Computer.
LESSON 6 Working with Charts. Each chart type has its own collection of sub-types that provide various alternate formats for the selected chart type.
GoogleEarth Keyhole Markup Language (KML) Based on Extensible Markup Language (XML) KML files can come from Internet servers or files on your computer.
16 Map Layer Mashups Mapping in the Cloud Peterson.
Topic 10- GIS layers to web
Computer Literacy for IC 3 Unit 2: Using Productivity Software Chapter 10: Enhancing a Presentation © 2010 Pearson Education, Inc. | Publishing as Prentice.
© 2008 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Niranjan Damera-Venkata HP Labs Design.
CONTACTING OTHER SERVERS.
Thematic Mapping with Google Maps. "US-KS":{code:"US-KS", name:"Kansas", center:{lat: ,lng: },
Open-Source JavaScript Maps with Leaflet Will Abson
OpenLayers Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
Industry case study: Data Eric Brumer 2/19/2014. Agenda Belltower Books Belltower Books Trucking: backend & frontend Google maps & javascript.
Geocoding Chapter 16 GISV431 &GEN405 Dr W Britz. Georeferencing, Transformations and Geocoding Georeferencing is the aligning of geographic data to a.
Point Maps Peterson’s Chapter 11 & 12. Points and Point Maps Points – Datum and coordinate systems – geocoding Point Maps – Show where points are (just.
Creating Databases Example using Google Maps API + file creation. Dollar sign problem. Classwork/Homework: [catch up]. Work on final project.
Google Maps API. Contents: 1. Google Maps API Key 2. Create a Basic Google Map 3. Google Maps Overlays 4. Google Maps Events 5. Google Maps Controls 6.
1 Bus Tracker A Google Maps Application. 22 Objectives You will be able to Add an icon to a map created with the Google Maps API. Use Ajax techniques.
Creating Databases Example using Google Maps API + file creation. Dollar sign problem. Classwork/Homework: [catch up]. Work on final project.
Chap 4. Geolocation API.
ISC440: Web Programming 2 Web APIs Google Maps API
JavaScript: Array, Loop, Data File
Google Maps: A Short How-to
ADVANCED: Making maps with Leaflet.js Part II
Chapter 7: Producing Your Proposal
Introduction to Google Maps
Introduction To Leaflet.js
JavaScript Programming Labs
How to Create Tables & Graphs in Excel
Presentation transcript:

Lines and Polygons Peterson

Simple Line

function initialize() { var myLatLng = new google.maps.LatLng(5, -170); var myOptions = { zoom: 2, center: myLatLng, mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var flightPlanCoordinates = [ new google.maps.LatLng( , ), new google.maps.LatLng( , ), new google.maps.LatLng( , ), new google.maps.LatLng( , ) ]; var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 3 }); flightPath.setMap(map); }

Flow Map

Fat Line // Second line segment var flightPlanCoordinates = [ new google.maps.LatLng(41.8, -87.7), new google.maps.LatLng(44.9, -93.3) ]; var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: “#00FF00”, strokeOpacity:.5, strokeWeight: 10 }); flightPath.setMap(map);

Great Circle

Geodesic = Great circle var flightPlanCoordinates = [ new google.maps.LatLng(34, ), new google.maps.LatLng(51.5, 0) ]; var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF0000", strokeOpacity: 1.0, geodesic: true, strokeWeight: 3 });

From XML file

// Add a listener for the click event google.maps.event.addListener(map, 'click', addLatLng); } /** * Handles click events on a map, and adds a new point to the Polyline. */ function addLatLng(event) { var path = poly.getPath(); // Because path is an MVCArray, we can simply append a new coordinate // and it will automatically appear path.push(event.latLng); // Write out coordinates in contentWindow showInContentWindow(event.latLng); // Add a new marker at the new plotted point on the polyline. var marker = new google.maps.Marker({ position: event.latLng, title: '#' + path.getLength(), map: map });

Cross-section

// Display a polyline of the elevation path. var pathOptions = { path: elevationPath, strokeColor: '#0000CC', opacity: 0.4, map: map } polyline = new google.maps.Polyline(pathOptions); // Extract the data from which to populate the chart. var data = new google.visualization.DataTable(); data.addColumn('string', 'Sample'); data.addColumn('number', 'Elevation'); for (var i = 0; i < results.length; i++) { data.addRow(['', elevations[i].elevation]); }

Encoded Polylines

Encoding

Polygon

var bermudaTriangle; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var triangleCoords = [ new google.maps.LatLng( , ), new google.maps.LatLng( , ), new google.maps.LatLng( , ), new google.maps.LatLng( , ) ]; // Construct the polygon bermudaTriangle = new google.maps.Polygon({ paths: triangleCoords, strokeColor: "#FF0000", strokeOpacity: 0.8, strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.35 });

From XML file

downloadUrl("17_point_polygon.xml", function(doc) { var xmlDoc = xmlParse(doc); var markers = xmlDoc.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { // obtain the attribues of each marker var lat = parseFloat(markers[i].getAttribute("lat")); var lng = parseFloat(markers[i].getAttribute("lng")); var point = new google.maps.LatLng(lat,lng); flightPlanCoordinates[i]=point; counter=i var html = markers[i].getAttribute("html"); var label = markers[i].getAttribute("label"); // create the marker var marker = createMarker(point,label,html); } // put the assembled side_bar_html contents into the side_bar div document.getElementById("side_bar").innerHTML = side_bar_html; // make last point equal to first flightPlanCoordinates[counter+1]=flightPlanCoordinates[0]; // define the line characteristics var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF00F0", strokeOpacity: 1.0, strokeWeight: 3, fillColor: "#FF00F0", fillOpacity: 0.5 }); // put the line on the map flightPath.setMap(map);

Donut

function initialize() { var myOptions = { zoom: 10, center: new google.maps.LatLng( , ), mapTypeControl: true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); bounds = new google.maps.LatLngBounds(); var donut = new google.maps.Polygon({ paths: [drawCircle(new google.maps.LatLng( , ), 200), drawCircle(new google.maps.LatLng( , ), 100)], strokeColor: "#0000FF", strokeOpacity: 0.8, strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.35 }); donut.setMap(map); map.fitBounds(bounds); }

Line Coordinate Thinning

File Conversion

Formatting for XML file

From KML file

Google Map Error

Choropleth Map

// Put the population data for the counties into the popdata array popdata = new Array (33185,6931,372,783,492,5668,11132,2185,3354,43954,7341,8595,25963,8819,3811,5934,9 865,6564,10113,9660,11242,20587,8466,25018,1958,6170,36171,492003,2109,6259,3348,2 729,5003,23365,1995,1790,1978,660,2454,55555,9490,3446,1029,2926,10610,756,6736,78 74,4683,6701,8250,892,3710,8812,267135,35865,749,656,497,35279,7954,5171,3705,7247, 4650,15747,2804,2992,9442,7564,31962,5349,10865,8656,1544,14155,142637,20344,3654 6,16835,5571,3083,1403,6570,5317,629,7273,4373,20044,9196,3701,823,14502) // Find the min and max population values for the 93 counties after doing a non-linear transformation using the log function var min= ; var max= ; for (var i = 0; i < 93; i++) { popdata[i] = Math.log(popdata[i]) if (popdata[i] < min) { min=popdata[i] } if (popdata[i] > max) { max=popdata[i] } } // Find the range and compute the opacities for each polygon var range = max-min // compute an opacity as a range of the data values opacities = new Array () for (var i = 0; i < 93; i++) { opacities[i] = 1-((max - popdata[i]) / range)

Opacity-based Choropleth Map

Heat Map

Shaded Isoline (Isotherms)

Heatmap Data

function initialize() { var brazil = new google.maps.LatLng( , ); map = new google.maps.Map(document.getElementById('map_canvas'), { center: brazil, zoom: 4, mapTypeId: 'roadmap' }); // Table has beaches along Brazil's coastline // View this table in a webpage: layer = new google.maps.FusionTablesLayer(136705, { heatmap: true