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.

Slides:



Advertisements
Similar presentations
Connect Pictometry Online End User
Advertisements

Chapter 17 Creating Images for the Web. Chapter Lessons Learn about Web features Optimize images for Web use Create a button for a Web page Create slices.
Google Maps API. Today’s Objectives Get Google Maps working: desktop + mobile Get clustering data complete, data onto a map.
Lines and Polygons Peterson. Simple Line function initialize() { var myLatLng = new google.maps.LatLng(5, -170); var myOptions = { zoom: 2, center: myLatLng,
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Point Mashups Peterson. Icons Info Marker Random Points.
CHAPTER 26 CREATING LOCATION-AWARE WEBPAGES USING GEOLOCATION.
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.
Google mapping tools in the newsroom Part 2 Highway Africa 2010 Compiled and presented by Jackie Rajuai.
Esri International User Conference | San Diego, CA Technical Workshops | ArcGIS for SharePoint, An Introduction Art Haddad Rich Zwaap.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
WDV 331 Dreamweaver Applications Designing Websites for Mobile Devices Dreamweaver CS6 Chapter 11.
Hammond Sanitary District Interactive Web Mapping with Google Maps and Google Apps An Introduction to KML, Google Fusion Tables, and the Google Maps API.
CS 174: Web Programming April 21 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Set 11: Mashups (emphasis on Google tools) IT452 Advanced Web and Internet Systems.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Programming Games Recap on Google Maps. Creating elements. Dynamic creation of elements (multiple video elements). Geolocation. Classwork/Homework: Catch-up.
Introduction to ArcGIS API for JavaScript
Exploring Map Layers in Google Earth Georeferencing Images.
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:
My Top Ten Tech Tools Chrystalle Doyle Ashton Elementary
Karsten Vennemann, Seattle Free and Easy Web Mapping.
JavaScript Programming B.Ramamurthy 6/113/2014B. Ramamurthy CSE6511.
WIX.com CIS 282 Class Demo Walid Zaman. What is Wix.com  It is a free DIY website publishing platform  It lets users build innovative HTML 5 websites.
Patroklos Patroklou George Antoniou Constantinos Kyprianou.
1 Tradedoubler & Mobile Mobile web & app tracking technical overview.
Tutorial: Using ArcGIS Server and ESRI ArcGIS API for Javascript Peter Sforza March 7, 2013.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Introduction to Web AppBuilder for ArcGIS: JavaScript Apps Made Easy
1 HTML Forms
Programming Games Reprise: storage, datatypes. Geolocation/Google API example. Work session Homework: [Catch up. Upload work. Post proposal.] Work on your.
Ryan MacDowell Marko Popović.  Currently it takes too much time and effort to understand how, where, and when people spend their money  Create a web.
Session: 19. © Aptech Ltd. 2HTML5 Geolocation and APIs / Session 19  Explain geolocation and its use in HTML5  Explain the Google Maps API  Explain.
1 HTML Forms
Virtual Earth Map Control V4 MARK MAGLIOCCO Phillydotnet.org 11/21/2006
Ayers Rock Country: Australia State: Northern Territory Elevation: 863 m (2,831 ft) Prominence:348 m (1,142 ft) Coordinates: 25°20′42″S 131°02′10″E.
Australian World Heritage Site Presented: Mookkie Class: Make a presentation.
Web Foundations WEDNESDAY, NOVEMBER 20, 2013 LECTURE 32: DREAMWEAVER SLIDE SHOW AND GOOGLE MAP.
Adding ArcGIS Online to Your GIS Curriculum
Static Locations, Dynamic Content.
14 Lines and Polygons Mapping in the Cloud Peterson.
ArcGIS Online: Sharing your Content Ben Ramseth John Thieling.
Implementation of Google Map in Drupal Create in Miyula Zeng, XiaoHang Zou,
16 Map Layer Mashups Mapping in the Cloud Peterson.
We build high quality innovative components, plug-in and modules for Joomla. Businesses all around the World use our products and services to create the.
 Smartphones – iPhone, Android, Blackberries, etc  Tablets – iPad, Android, Windows, Google, etc.  Computers Basically anything that can connect to.
GEOVISUALIZATION: VISUALIZE THAT ON A MAP Sarah G. Park April 14, 2016.
CSCI 3100 Tutorial 2 Web Development Tools 1 HTML 5 & CSS 3 1.
Aboriginal Art.
Point Maps Peterson’s Chapter 11 & 12. Points and Point Maps Points – Datum and coordinate systems – geocoding Point Maps – Show where points are (just.
Gayatri Global Services Get More Customers Automate your business Kolhapur Office 2985, A Ward, Babujamal Road, Near Mahalaxmi Temple, Kolhapur
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.
Sharing Maps and Layers to Portal for ArcGIS Melanie Summers, Tom Shippee, Ty Fitzpatrick.
ArcGIS API for javascript
Mapping for the interwebs
An Introductory Lesson Liberty Elementary School November 6 & 9, 2007
Web Services application that operates over a network
An Introduction to Office 365: OneDrive For Business
CaRT eCapacity Initiative Ghana Productivity Apps
An Introduction to Office 365: OneDrive For Business
CHAPTER 9 APIS. CHAPTER 9 APIS WHAT IS AN API?
Tracking and Booking Taxi
JavaScript: Array, Loop, Data File
JavaScript Programming Labs
Technical Capabilities
REST Easy - Instant APIs for Your Database
Christopher Harrison Jeremy Foster
Presentation transcript:

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 – also in mobile devices

Google Maps API

Google Maps API -javascript Multiple Possibilities Maps JavaScript API ( ) Static Maps API ( ) Maps API for Flash Google Earth (3d) API (

Google Maps / GEO Apis

A basic Map in a Web-page

Features of Maps API Keyless Designed for multiple platforms including mobile Styled Maps Markers Polygons/Polylines Geocoding/Driving Directions Elecvation Fusion Tables integration

Static Maps Have no dynamic component but, will display a location – useful for showing where a fixed location is (location of company, etc). EXAMPLE – Sao Paulo, Brazil with size and zoom given sensor=false&size=500x300&zoom=9&center= Sao+Paulo+Brazil

Stylized Static Maps Append Style information to URL of static map (same location as previous) center=Sao+Paulo+Brazil&style=feature:water|saturation:100|hue:0xff5e00|gamma: 0.58&style=feature:landscape|invert_lightness:true&style=element:labels|visibility:o ff&style=feature:poi|hue:0x0800ff|lightness:- 70&style=feature:administrative|element:geometry|visibility:off

Dynamic Maps with Google JavaScript Map API Hello World Example html { height: 100% } body { height: 100%; margin: 0px; padding: 0px } #map_canvas { height: 100% } function initialize() { var latlng = new google.maps.LatLng( , ); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); }

HelloWorld Map explained function initialize() { var latlng = new google.maps.LatLng( , ); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } Create new instance of LatLng object Setup Options for map will create Create new instance of a Google Map with our options and associated with a div tag in our html body

HelloWorld Map example See course website for other examples 020/Mat/Maps/HelloWorldMap.htm 020/Mat/Maps/HelloWorldMap.htm

Markers Markers are like map pins showing the location of places of interest in your map. var map; function initialize() { var myLatlng = new google.maps.LatLng( , ); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title:"Hello World!" }); }

Markers example See course website for examples and more details on markers 020/Mat/Maps/Example_Map_Marker.htm 020/Mat/Maps/Example_Map_Marker.htm

Markers Example with Events – open an InfoWindow (bubble) var myLatlng = new google.maps.LatLng( , ); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var contentString = ' '+ ' '+ ' Uluru '+ ' '+ ' Uluru, also referred to as Ayers Rock, is a large ' + 'sandstone rock formation in the southern part of the '+ 'Northern Territory, central Australia. It lies 335 km (208 mi) '+ 'south west of the nearest large town, Alice Springs; 450 km '+ '(280 mi) by road. Kata Tjuta and Uluru are the two major '+ 'features of the Uluru - Kata Tjuta National Park. Uluru is '+ 'sacred to the Pitjantjatjara and Yankunytjatjara, the '+ 'Aboriginal people of the area. It has many springs, waterholes, '+ 'rock caves and ancient paintings. Uluru is listed as a World '+ 'Heritage Site. '+ ' Attribution: Uluru, '+ ' (last visited June 22, 2009). '+ ' '+ ' '; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: myLatlng, map: map, title:"Uluru (Ayers Rock)" }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); Create Map String to be content to be in “bubble” overlay (InfoWindow) that will be displayed (opened) when user clicks on a marker Create “bubble” InfoWindow Create Marker Add Event Listner – when user clicks on marker open the InfoWindow (“bubble”)

Markers Example with Events – open an InfoWindow (bubble) Try it at: 0/Mat/Maps/Example_Map_Marker_InfoWin dowOverlay.htm

Stylized Maps Control look of maps Change size, color, and visibility of – Points of Interest – Labels – Roads – Water – Borders – and more Clean up interface Match the color scheme of your site Be artistic

Example Stylized Maps from Google Black with no roads,

Code var map; var munich = new google.maps.LatLng( , ); var MY_MAPTYPE_ID = 'noroads'; f unction initialize() { var stylez = [ { featureType: "road", elementType: "all", stylers: [ { visibility: "off" } ] }, { featureType: "poi", elementType: "all", stylers: [ { visibility: "off" } ] }, { featureType: "water", elementType: "all", stylers: [ { saturation: -100 }, { lightness: -100 }, { gamma: 8.79 } ] } ]; var mapOptions = { zoom: 12, center:munich, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID] }, mapTypeId: MY_MAPTYPE_ID }; map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); var styledMapOptions = { name: "No Roads" }; var nrMapType = new google.maps.StyledMapType(stylez, styledMapOptions); map.mapTypes.set(MY_MAPTYPE_ID, nrMapType); }

Example Stylized Maps from Google Land and Water only v3.googlecode.com/svn/trunk/styledmaps/exa mples/style2.htmlhttp://gmaps-samples- v3.googlecode.com/svn/trunk/styledmaps/exa mples/style2.html

code Styles < script type="text/javascript"> var maps; var geocoder; function init() { var styles = { 'Dark': [ { featureType: "all", elementType: "all", stylers: [ { invert_lightness: true } ] },{ featureType: "administrative", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "landscape", elementType: "all", stylers: [ { visibility: "off" } ] },{ featureType: "poi", elementType: "all", stylers: [ { visibility: "off" } ] },{ featureType: "road", elementType: "all", stylers: [ { visibility: "off" } ] },{ featureType: "transit", elementType: "all", stylers: [ { visibility: "off" } ] },{ featureType: "water", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "water", elementType: "geometry", stylers: [ { lightness: 50 } ] } ] }; for (var s in styles) { var opt = { mapTypeControlOptions: { mapTypeIds: [s] }, disableDefaultUI: true, navigationControl: true, center: new google.maps.LatLng( , ), zoom: 8, mapTypeId: s }; var div = document.getElementById('map'); var map = new google.maps.Map(div, opt); var styledMapType = new google.maps.StyledMapType(styles[s], {name: s}); map.mapTypes.set(s, styledMapType); } } body { margin: 0px; padding: 0px; } #map { width: 500px; height: 180px; border: 1px solid black; margin: 0px; padding: 0px; }

Fusion Tables What are they How to create and use

Google Maps – Fusion Tables Data management web application allowing easy host, manage, collaboration on, visualization and publishing of data tables online

Fusion Tables –uploading data Connect to google and go to fusion tables Public files can be seen by all. You can have your own tables

Fusion Tables - visualization Tools lets you “see” / visualize data

Fusion Table Layer JavaScript code: layer = new google.maps.FusionTablesLayer (someid, { query: “SELECT address FROM someid WHERE ridership > 5000”} ); Layer.setMap(map);

Fusion Tables Demos from Google Bounding Box search samples.googlecode.com/svn/trunk/fusiontab les/rectangle_example.html

Fusion Tables Demos from Google Radius Search samples.googlecode.com/svn/trunk/fusiontab les/circle_example.html

Fusion Tables Demos from Google Congressional Areas e?dsrcid=290985

Mobile Features

Google Latitude A mobile app that lets you see where your friends are on a map and share your Real location with whomever you choose. Location continuously & automatically updated Add friends with whom you share location Share best available or city-level location Change privacy settings at any time Android, BlackBerry, Symbian, Windows Mobile, or iPhone* 29 countries, 42 languages 8 million+ accounts created & 3 million+ active users

Google Latitude API Use features of Google Latitude in your app A simple and secure way for users to use their location in new ways by sharing it with 3 rd party developers, apps, and services in addition to their friends. Why use the Latitude API? What would you offer your users if they shared their real location with you? Latitude pushes users’ real location to the cloud so any service – mobile or desktop – can leverage it for location- based features without building a mobile app. Create smarter features based on users’ location history if enabled

Mobile Apps---use your imagination