SlideShare une entreprise Scribd logo
1  sur  40
Ritesh Ambastha,
iWillStudy.com, 9th March 2013
Google Maps API

                  Maps API
   JavaScript                        Google
                    Web
     API v3                        Places API
                  Services

    JavaScript API
   Static Maps   Street View
                                   Earth API
       API       Image API
         v3
    Google
                   Maps        Deprecated
   Maps SDK
                 Android API      API
    for iOS


                       Ahmedabad
Google Maps JavaScript API v3

  Concepts   Events          Controls


   Styles    Overlays        Layers

    Map
             Services        Libraries
   Types
                 Ahmedabad
Getting Started




             APIs             HelloWorld
 API Key
            Console            Program




                  Ahmedabad
Obtain API Key

https://code.google.com/apis/console




                  Ahmedabad
Create Client ID




               Ahmedabad
Client ID Settings




                Ahmedabad
HelloWorld !!
Let’s write the very first HTML
Basic Terminology

           • API Key
  Script   • Sensor


  HTML5    • <!DOCTYPE HTML>


  Map
           • var mapOptions = {
                center: new google.maps.LatLng(22,72),
                zoom: 8,
 Options     };
                mapTypeId: google.maps.MapTypeId.ROADMAP



                    Ahmedabad
Basic Terminology
             • ROADMAP

Map Types    • SATELLITE
             • HYBRID
             • TERRAIN



             • var map = new

Map Object     google.maps.Map(document.getElementById("map_ca
               nvas"),
                 mapOptions);




 Load Map    • <body onload="initialize()">



                           Ahmedabad
HelloWorld Program

<script type="text/javascript"
   src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE">
</script>

<script type="text/javascript">
   function initialize() {
     var mapOptions = {
        center: new google.maps.LatLng(22.1,77.2),
        zoom: 8,
        mapTypeId: google.maps.MapTypeId.ROADMAP
     };
     var map = new google.maps.Map(document.getElementById("map_canvas"),
         mapOptions);
   }
</script>



                                                Ahmedabad
<!DOCTYPE html>
     6
<html>
 <head>
 <script type="text/javascript”
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDVBGLEP0GQpiuDGvNBAaclm62Z0ujZz7U&sensor=false">
  </script>
  <script type="text/javascript">
   function initialize() {
     var mapOptions = {
       center: new google.maps.LatLng(22.9909363,72.48775950000004),
       zoom: 8,
       mapTypeId: google.maps.MapTypeId.ROADMAP
     };
     var map = new google.maps.Map(document.getElementById("map_canvas"),
        mapOptions);
   }
  </script>
 </head>

 <body onload="initialize()">
  <div id="map_canvas" style="width:500px; height:500px"></div>
 </body>
</html>

                                                        Ahmedabad
Output

Ahmedabad
Purchase Google Maps API, if

                                Your site is only
    Your site is only
                             accessible within your
   available to paying
                              company or on your
      customers.
                                   intranet.



              Your application relates
               to enterprise dispatch,
                 fleet management,
              business asset tracking,
               or similar applications.

                          Ahmedabad
Usage Limits & Billing
                                     1,000 excess
                    Usage limit
Service                                map loads
                      (per day)
                                  (in U.S. dollars)
JS Maps API v3          25,000               $0.50

JS Maps API v2          25,000               $1.00
(Deprecated)
Static Maps API         25,000               $0.50

Street View Image       25,000               $0.50
API
                      Ahmedabad
For example, the API will fire azoom_changed event on a map when the map's zoom level changes. You can intercept these state changes by registering addListener() event handler




             Google Maps Events

                                  User Events                                                               MVC State Change

             • google.maps.marker                                                               • Whenever an object's
               object can listen to the                                                           property changes, the API
               following user events                                                              will fire an event that the
               • 'click'                                                                          property has changed.
               • 'dblclick'                                                                     • For example, the API will
               • 'mouseup'                                                                        fire a event on a map when
                                                                                                  the map's zoom level
               • 'mousedown'
                                                                                                  changes. You can intercept
               • 'mouseover'                                                                      these state changes by
               • 'mouseout'                                                                       registering event handlers
                                                                                                  on the namespace method


                                                                                        Ahmedabad
For example, the API will fire azoom_changed event on a map when the map's zoom level changes. You can intercept these state changes by registering addListener() event handler




             Google Maps Events

                                                                      User Events

              • google.maps.marker object can listen to the
                following user eventsEvents also typically
                • 'click'              pass arguments
                • 'dblclick'
                • 'mouseup'            within the event
                • 'mousedown'        noting some UI state
                • 'mouseover'        (such as the mouse
                • 'mouseout'
                                                                                                       position).
                                                                                        Ahmedabad
For example, the API will fire azoom_changed event on a map when the map's zoom level changes. You can intercept these state changes by registering addListener() event handler




             Google Maps Events

                                                        MVC State Change

              • MVC events do not pass arguments
                within their event.
              • You will want to inspect the property that
                changed on an MVC state change by
                calling the appropriate Property method
                on that object.

                                                                                        Ahmedabad
Let’s perform an example



       pan-back-to-
       marker.html


               Ahmedabad
Arguments in UI Events
  UI events within the Google Maps API V3 typically
  pass an event argument, which can be accessed by
  the event listener
  For example, a UI event typically passes
  a containing a property denoting the clicked
  location on the map

  Lets perform an example which adds an event
  listener for the map, and creates a marker when the
  user clicks on the map at the clicked location.

             event-arguments.html
                          Ahmedabad
Map Controls

   Zoom         Pan          Scale

               Street
 MapType                     Rotate
               View

           Overview
             Map
                 Ahmedabad
Adding Controls to the Map

                             function initialize() {
{                              var mapOptions = {
  panControl: boolean,           zoom: 4,
                                 center: new google.maps.LatLng(-
  zoomControl: boolean,      33, 151),
  mapTypeControl:                panControl: false,
boolean,                         zoomControl: false,
                                 scaleControl: true,
  scaleControl: boolean,         mapTypeId:
  streetViewControl:         google.maps.MapTypeId.ROADMAP
boolean,                       }
                               var map = new
  overviewMapControl:        google.maps.Map(document.getEle
boolean                      mentById("map_canvas"),
}                                  mapOptions);
                             }


                           Ahmedabad
Let’s perform an example




    map-controls.html


               Ahmedabad
Maps – Styles and Syntax

     Map Features                       Stylers

• Geographic elements          • Color and visibility
  that can be targeted on        properties that can be
  the map. These                 applied to map
  include roads, parks,          features. They define
  bodies of water, and           the display color
  more, as well as their         through a combination
  labels.                        of hue, color, and
                                 lightness/gamma
                                 values.


                            Ahmedabad
Map Features
The following element types are supported:

•all (default) selects all elements of that feature.
•geometry selects all geometric elements of that feature.
     •geometry.fill selects only the fill of the feature's geometry.
     •geometry.stroke selects only the stroke of the feature's geometry.
•labels selects only textual labels associated with that feature.
     •labels.icon selects only the icon displayed within the feature's
     label.
     •labels.text selects only the text of the label.
     •labels.text.fill selects only the fill of the label. The fill of a label is
     typically rendered as a colored outline that surrounds the label text.
     •labels.text.stroke selects only the stroke of the label's text.


                                        Ahmedabad
Map Features – Code Snippet

The following specification selects the
labels for all local roads:

{
    featureType: "road.local",
    elementType: "labels"
}

                       Ahmedabad
Map Stylers

     hue            lightness             Saturation




    gamma       innverse_lightness         visibility




            color                weight



                        Ahmedabad
Stylers – Code Snippet

The following specification selects the
labels for all local roads:

stylers: [
  { hue: "#00d4ff" },
  { saturation: 60 },
  { lightness: -20 },
  { gamma: 1.51 }
]
                        Ahmedabad
Let’s perform two examples



    style-example.html
   style-example2.html

               Ahmedabad
The Styled Map Wizard



    http://gmaps-samples-
 v3.googlecode.com/svn/trun
 k/styledmaps/wizard/index.h
              tml
              Ahmedabad
Overlays

 Overlays are objects on the
    map that are tied to
      latitude/longitude
 coordinates, so they move
 when you drag or zoom the
             map
              Ahmedabad
Overlays – To Learn
    Adding      Removing
                              Symbols         Markers
   Overlays     Overlays


    Simple      Complex
                             Polylines       Polygons
    Icons        Icons

                 User-
  Circles and                 Editing         Drawing
                Editable
  Rectangles                  Events          Library
                Shapes

            Info       Ground          Custom
          Windows      Overlays        Overlays

                           Ahmedabad
Let’s perform two examples



  simple-marker.html
  marker-animate.html

               Ahmedabad
Let’s perform two examples



      overlay.html
  overlay-remove.html

               Ahmedabad
Let’s perform three examples




     marker-icon.html
      polygon.html
      polyline.html
               Ahmedabad
Layers

Layers are objects on the map that consist of one or more
  separate items, but are manipulated as a single unit.


   KML          GeoRSS         Heatmap          Traffic


                              Weather &
  Transit        Bicycle                     Panoramio
                               Cloud


                            Ahmedabad
KML & GeoRSS Layers

The Google Maps API supports the KML and GeoRSS data formats for
displaying geographic information.
These data formats are displayed on a map using a KmlLayer object, whose
constructor takes the URL of a publicly accessible KML or GeoRSS file.




          KML                              GeoRSS

                                      Ahmedabad
Let’s perform two examples



    kml-example.html
      georss.html

               Ahmedabad
Let’s code the examples for
each



Heatmap      Traffic         Transit


           Weather &
 Bicycle                    Panoramio
            Cloud

                Ahmedabad
Keep Mapping
Ritesh Ambastha
ritesh@iwillstudy.com
Facebook.com/riteshambastha
Twitter.com/riteshambastha
+91-9408098777

Contenu connexe

En vedette

iWillStudy.com - Light Pitch
iWillStudy.com - Light PitchiWillStudy.com - Light Pitch
iWillStudy.com - Light PitchNAILBITER
 
Ubilabs: Google Maps API - Best Practices
Ubilabs: Google Maps API - Best PracticesUbilabs: Google Maps API - Best Practices
Ubilabs: Google Maps API - Best PracticesMartin Kleppe
 
구글맵 JavaScript API
구글맵 JavaScript API구글맵 JavaScript API
구글맵 JavaScript APIETRIBE_STG
 
Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe Martin Kleppe
 

En vedette (8)

iWillStudy.com - Light Pitch
iWillStudy.com - Light PitchiWillStudy.com - Light Pitch
iWillStudy.com - Light Pitch
 
Google maps api 3
Google maps api 3Google maps api 3
Google maps api 3
 
Ubilabs: Google Maps API - Best Practices
Ubilabs: Google Maps API - Best PracticesUbilabs: Google Maps API - Best Practices
Ubilabs: Google Maps API - Best Practices
 
Google maps
Google mapsGoogle maps
Google maps
 
Google Maps API
Google Maps APIGoogle Maps API
Google Maps API
 
구글맵 JavaScript API
구글맵 JavaScript API구글맵 JavaScript API
구글맵 JavaScript API
 
Google Maps
Google MapsGoogle Maps
Google Maps
 
Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe
 

Similaire à Google Maps API Styling

ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialMohammed Mahmoud
 
GeoAdmin API & Mobile API, 2012
GeoAdmin API & Mobile API, 2012GeoAdmin API & Mobile API, 2012
GeoAdmin API & Mobile API, 2012Moullet
 
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to heroBuilding a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to heroAllan Laframboise
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.OReillyWhere20
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesMichael Galpin
 
Serverless - Developers.IO 2019
Serverless - Developers.IO 2019Serverless - Developers.IO 2019
Serverless - Developers.IO 2019Shuji Watanabe
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Ossama Alami
 
Android application for gps
Android application for gpsAndroid application for gps
Android application for gpsSutej Chakka
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Esri Nederland
 
ADF and JavaScript - AMIS SIG, July 2017
ADF and JavaScript - AMIS SIG, July 2017ADF and JavaScript - AMIS SIG, July 2017
ADF and JavaScript - AMIS SIG, July 2017Lucas Jellema
 
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...Matt Spradley
 
Android mobile application for gps
Android mobile application for gpsAndroid mobile application for gps
Android mobile application for gpsSutej Chakka
 
Si l 세미나_#3_v2.3_20121128
Si l 세미나_#3_v2.3_20121128Si l 세미나_#3_v2.3_20121128
Si l 세미나_#3_v2.3_20121128현 강
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
HTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexHTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexTadayasu Sasada
 

Similaire à Google Maps API Styling (20)

ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript Tutorial
 
Geolocation and Mapping
Geolocation and MappingGeolocation and Mapping
Geolocation and Mapping
 
GeoAdmin API & Mobile API, 2012
GeoAdmin API & Mobile API, 2012GeoAdmin API & Mobile API, 2012
GeoAdmin API & Mobile API, 2012
 
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to heroBuilding a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
 
Google Maps Api
Google Maps ApiGoogle Maps Api
Google Maps Api
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Serverless - Developers.IO 2019
Serverless - Developers.IO 2019Serverless - Developers.IO 2019
Serverless - Developers.IO 2019
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
 
Android Oreo
Android OreoAndroid Oreo
Android Oreo
 
Android application for gps
Android application for gpsAndroid application for gps
Android application for gps
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
 
ADF and JavaScript - AMIS SIG, July 2017
ADF and JavaScript - AMIS SIG, July 2017ADF and JavaScript - AMIS SIG, July 2017
ADF and JavaScript - AMIS SIG, July 2017
 
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
 
Android mobile application for gps
Android mobile application for gpsAndroid mobile application for gps
Android mobile application for gps
 
Location Based Services Without the Cocoa
Location Based Services Without the CocoaLocation Based Services Without the Cocoa
Location Based Services Without the Cocoa
 
SiLApps for Smart Working
SiLApps for Smart WorkingSiLApps for Smart Working
SiLApps for Smart Working
 
Si l 세미나_#3_v2.3_20121128
Si l 세미나_#3_v2.3_20121128Si l 세미나_#3_v2.3_20121128
Si l 세미나_#3_v2.3_20121128
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
HTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexHTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHex
 

Plus de NAILBITER

Social Media Strategies
Social Media StrategiesSocial Media Strategies
Social Media StrategiesNAILBITER
 
jQuery for Beginners
jQuery for Beginners jQuery for Beginners
jQuery for Beginners NAILBITER
 
GBGahmedabad - Create your Business Website
GBGahmedabad - Create your Business WebsiteGBGahmedabad - Create your Business Website
GBGahmedabad - Create your Business WebsiteNAILBITER
 
Cloud Workshop - Presentation
Cloud Workshop - PresentationCloud Workshop - Presentation
Cloud Workshop - PresentationNAILBITER
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud ComputingNAILBITER
 
Cloud Summit Ahmedabad
Cloud Summit AhmedabadCloud Summit Ahmedabad
Cloud Summit AhmedabadNAILBITER
 
Android Fundamentals & Figures of 2012
Android Fundamentals & Figures of 2012Android Fundamentals & Figures of 2012
Android Fundamentals & Figures of 2012NAILBITER
 
The iPhone development on windows
The iPhone development on windowsThe iPhone development on windows
The iPhone development on windowsNAILBITER
 
Ambastha EduTech Pvt Ltd
Ambastha EduTech Pvt LtdAmbastha EduTech Pvt Ltd
Ambastha EduTech Pvt LtdNAILBITER
 
Develop open source search engine
Develop open source search engineDevelop open source search engine
Develop open source search engineNAILBITER
 
Location based solutions maps & your location
Location based solutions   maps & your locationLocation based solutions   maps & your location
Location based solutions maps & your locationNAILBITER
 
Html5 workshop part 1
Html5 workshop part 1Html5 workshop part 1
Html5 workshop part 1NAILBITER
 
Android Workshop - Session 2
Android Workshop - Session 2Android Workshop - Session 2
Android Workshop - Session 2NAILBITER
 
Android Workshop Session 1
Android Workshop Session 1Android Workshop Session 1
Android Workshop Session 1NAILBITER
 
Linux Seminar for Beginners
Linux Seminar for BeginnersLinux Seminar for Beginners
Linux Seminar for BeginnersNAILBITER
 
Linux advanced concepts - Part 2
Linux advanced concepts - Part 2Linux advanced concepts - Part 2
Linux advanced concepts - Part 2NAILBITER
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1NAILBITER
 
Linux concepts
Linux conceptsLinux concepts
Linux conceptsNAILBITER
 

Plus de NAILBITER (20)

Social Media Strategies
Social Media StrategiesSocial Media Strategies
Social Media Strategies
 
jQuery for Beginners
jQuery for Beginners jQuery for Beginners
jQuery for Beginners
 
GBGahmedabad - Create your Business Website
GBGahmedabad - Create your Business WebsiteGBGahmedabad - Create your Business Website
GBGahmedabad - Create your Business Website
 
Cloud Workshop - Presentation
Cloud Workshop - PresentationCloud Workshop - Presentation
Cloud Workshop - Presentation
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Cloud Summit Ahmedabad
Cloud Summit AhmedabadCloud Summit Ahmedabad
Cloud Summit Ahmedabad
 
Android Fundamentals & Figures of 2012
Android Fundamentals & Figures of 2012Android Fundamentals & Figures of 2012
Android Fundamentals & Figures of 2012
 
The iPhone development on windows
The iPhone development on windowsThe iPhone development on windows
The iPhone development on windows
 
Ambastha EduTech Pvt Ltd
Ambastha EduTech Pvt LtdAmbastha EduTech Pvt Ltd
Ambastha EduTech Pvt Ltd
 
Branding
BrandingBranding
Branding
 
Advertising
AdvertisingAdvertising
Advertising
 
Develop open source search engine
Develop open source search engineDevelop open source search engine
Develop open source search engine
 
Location based solutions maps & your location
Location based solutions   maps & your locationLocation based solutions   maps & your location
Location based solutions maps & your location
 
Html5 workshop part 1
Html5 workshop part 1Html5 workshop part 1
Html5 workshop part 1
 
Android Workshop - Session 2
Android Workshop - Session 2Android Workshop - Session 2
Android Workshop - Session 2
 
Android Workshop Session 1
Android Workshop Session 1Android Workshop Session 1
Android Workshop Session 1
 
Linux Seminar for Beginners
Linux Seminar for BeginnersLinux Seminar for Beginners
Linux Seminar for Beginners
 
Linux advanced concepts - Part 2
Linux advanced concepts - Part 2Linux advanced concepts - Part 2
Linux advanced concepts - Part 2
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1
 
Linux concepts
Linux conceptsLinux concepts
Linux concepts
 

Dernier

4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 

Dernier (20)

4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 

Google Maps API Styling

  • 2. Google Maps API Maps API JavaScript Google Web API v3 Places API Services JavaScript API Static Maps Street View Earth API API Image API v3 Google Maps Deprecated Maps SDK Android API API for iOS Ahmedabad
  • 3. Google Maps JavaScript API v3 Concepts Events Controls Styles Overlays Layers Map Services Libraries Types Ahmedabad
  • 4. Getting Started APIs HelloWorld API Key Console Program Ahmedabad
  • 6. Create Client ID Ahmedabad
  • 7. Client ID Settings Ahmedabad
  • 8. HelloWorld !! Let’s write the very first HTML
  • 9. Basic Terminology • API Key Script • Sensor HTML5 • <!DOCTYPE HTML> Map • var mapOptions = { center: new google.maps.LatLng(22,72), zoom: 8, Options }; mapTypeId: google.maps.MapTypeId.ROADMAP Ahmedabad
  • 10. Basic Terminology • ROADMAP Map Types • SATELLITE • HYBRID • TERRAIN • var map = new Map Object google.maps.Map(document.getElementById("map_ca nvas"), mapOptions); Load Map • <body onload="initialize()"> Ahmedabad
  • 11. HelloWorld Program <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE"> </script> <script type="text/javascript"> function initialize() { var mapOptions = { center: new google.maps.LatLng(22.1,77.2), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); } </script> Ahmedabad
  • 12. <!DOCTYPE html> 6 <html> <head> <script type="text/javascript” src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDVBGLEP0GQpiuDGvNBAaclm62Z0ujZz7U&sensor=false"> </script> <script type="text/javascript"> function initialize() { var mapOptions = { center: new google.maps.LatLng(22.9909363,72.48775950000004), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:500px; height:500px"></div> </body> </html> Ahmedabad
  • 14. Purchase Google Maps API, if Your site is only Your site is only accessible within your available to paying company or on your customers. intranet. Your application relates to enterprise dispatch, fleet management, business asset tracking, or similar applications. Ahmedabad
  • 15. Usage Limits & Billing 1,000 excess Usage limit Service map loads (per day) (in U.S. dollars) JS Maps API v3 25,000 $0.50 JS Maps API v2 25,000 $1.00 (Deprecated) Static Maps API 25,000 $0.50 Street View Image 25,000 $0.50 API Ahmedabad
  • 16. For example, the API will fire azoom_changed event on a map when the map's zoom level changes. You can intercept these state changes by registering addListener() event handler Google Maps Events User Events MVC State Change • google.maps.marker • Whenever an object's object can listen to the property changes, the API following user events will fire an event that the • 'click' property has changed. • 'dblclick' • For example, the API will • 'mouseup' fire a event on a map when the map's zoom level • 'mousedown' changes. You can intercept • 'mouseover' these state changes by • 'mouseout' registering event handlers on the namespace method Ahmedabad
  • 17. For example, the API will fire azoom_changed event on a map when the map's zoom level changes. You can intercept these state changes by registering addListener() event handler Google Maps Events User Events • google.maps.marker object can listen to the following user eventsEvents also typically • 'click' pass arguments • 'dblclick' • 'mouseup' within the event • 'mousedown' noting some UI state • 'mouseover' (such as the mouse • 'mouseout' position). Ahmedabad
  • 18. For example, the API will fire azoom_changed event on a map when the map's zoom level changes. You can intercept these state changes by registering addListener() event handler Google Maps Events MVC State Change • MVC events do not pass arguments within their event. • You will want to inspect the property that changed on an MVC state change by calling the appropriate Property method on that object. Ahmedabad
  • 19. Let’s perform an example pan-back-to- marker.html Ahmedabad
  • 20. Arguments in UI Events UI events within the Google Maps API V3 typically pass an event argument, which can be accessed by the event listener For example, a UI event typically passes a containing a property denoting the clicked location on the map Lets perform an example which adds an event listener for the map, and creates a marker when the user clicks on the map at the clicked location. event-arguments.html Ahmedabad
  • 21. Map Controls Zoom Pan Scale Street MapType Rotate View Overview Map Ahmedabad
  • 22. Adding Controls to the Map function initialize() { { var mapOptions = { panControl: boolean, zoom: 4, center: new google.maps.LatLng(- zoomControl: boolean, 33, 151), mapTypeControl: panControl: false, boolean, zoomControl: false, scaleControl: true, scaleControl: boolean, mapTypeId: streetViewControl: google.maps.MapTypeId.ROADMAP boolean, } var map = new overviewMapControl: google.maps.Map(document.getEle boolean mentById("map_canvas"), } mapOptions); } Ahmedabad
  • 23. Let’s perform an example map-controls.html Ahmedabad
  • 24. Maps – Styles and Syntax Map Features Stylers • Geographic elements • Color and visibility that can be targeted on properties that can be the map. These applied to map include roads, parks, features. They define bodies of water, and the display color more, as well as their through a combination labels. of hue, color, and lightness/gamma values. Ahmedabad
  • 25. Map Features The following element types are supported: •all (default) selects all elements of that feature. •geometry selects all geometric elements of that feature. •geometry.fill selects only the fill of the feature's geometry. •geometry.stroke selects only the stroke of the feature's geometry. •labels selects only textual labels associated with that feature. •labels.icon selects only the icon displayed within the feature's label. •labels.text selects only the text of the label. •labels.text.fill selects only the fill of the label. The fill of a label is typically rendered as a colored outline that surrounds the label text. •labels.text.stroke selects only the stroke of the label's text. Ahmedabad
  • 26. Map Features – Code Snippet The following specification selects the labels for all local roads: { featureType: "road.local", elementType: "labels" } Ahmedabad
  • 27. Map Stylers hue lightness Saturation gamma innverse_lightness visibility color weight Ahmedabad
  • 28. Stylers – Code Snippet The following specification selects the labels for all local roads: stylers: [ { hue: "#00d4ff" }, { saturation: 60 }, { lightness: -20 }, { gamma: 1.51 } ] Ahmedabad
  • 29. Let’s perform two examples style-example.html style-example2.html Ahmedabad
  • 30. The Styled Map Wizard http://gmaps-samples- v3.googlecode.com/svn/trun k/styledmaps/wizard/index.h tml Ahmedabad
  • 31. Overlays Overlays are objects on the map that are tied to latitude/longitude coordinates, so they move when you drag or zoom the map Ahmedabad
  • 32. Overlays – To Learn Adding Removing Symbols Markers Overlays Overlays Simple Complex Polylines Polygons Icons Icons User- Circles and Editing Drawing Editable Rectangles Events Library Shapes Info Ground Custom Windows Overlays Overlays Ahmedabad
  • 33. Let’s perform two examples simple-marker.html marker-animate.html Ahmedabad
  • 34. Let’s perform two examples overlay.html overlay-remove.html Ahmedabad
  • 35. Let’s perform three examples marker-icon.html polygon.html polyline.html Ahmedabad
  • 36. Layers Layers are objects on the map that consist of one or more separate items, but are manipulated as a single unit. KML GeoRSS Heatmap Traffic Weather & Transit Bicycle Panoramio Cloud Ahmedabad
  • 37. KML & GeoRSS Layers The Google Maps API supports the KML and GeoRSS data formats for displaying geographic information. These data formats are displayed on a map using a KmlLayer object, whose constructor takes the URL of a publicly accessible KML or GeoRSS file. KML GeoRSS Ahmedabad
  • 38. Let’s perform two examples kml-example.html georss.html Ahmedabad
  • 39. Let’s code the examples for each Heatmap Traffic Transit Weather & Bicycle Panoramio Cloud Ahmedabad