SlideShare uma empresa Scribd logo
1 de 52
Agenda

 Goal: You’ll get an A to Z mobile web primer

 Why build mobile map apps?

 3 Approaches

 Frameworks

 CSS3 & HTML5

 Hybrid Map apps
Who are your presenters?

   Antoon Uijtdehaag, Esri Nederland
   Technical Consultant

   Email: auijtdehaag@esri.nl
   Twitter @uijtdehaag



   Andy Gup, Esri
   Tech Lead for Web APIs and Android
   Esri Developer Network

   Email: agup@esri.com
   Twitter: @agup
Who are you?
Why mobile?
Demo
Mobile usage stats for my website?




Web Server logs


Web analytic tools
Sample web-site stats from esri.com
Your 3 Approaches


                        Web app
     1.                     +
                    Native mobile app



                       Web app
     2.                     +
                    Web mobile app
                     (a.k.a Hybrid)



     3.              Web app only
                     (Responsive)
Many different screen sizes and pixel densities




                            1920x1080
Wait…how do I pan and zoom the map??
Hmmm…how many map layers do I load?




                     VS.




       1 GB RAM                   16 GB RAM
How come my map loads so slooow?




                        VS.




     Mostly connected              Always connected
My survey crews use GPS heavily…




                       VS.




     Limited battery               Unlimited power
resources.arcgis.com




      1440 x 900       480 x 800 hdpi
Mobile app – flip view port easily




   Portrait                          Landscape
Desktop app on smartphone
ArcGIS API for JavaScript - Compact




          http://esriurl.com/compactJS




<script type="text/javascript"
    src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2compact">
Why use the compact library?


         32 modules vs. 80 modules


                    Size   Latency

        Compact




        Full
Many mobile frameworks, such as…
The challenge
Mobile frameworks help with…



           Views

           Visual Components

           Themes
Views




        Image courtesy Dojo
Views



<div id="mapView" dojoType="dojox.mobile.View“
        style="width:100%;height:100%;">
    <h1 dojoType="dojox.mobile.Heading"
        back="Back" moveTo="mainView">
        5 + 10 minute Drive Times
    </h1>
    <div id="map“ style="width:100%; height:100%;“/>
</div>
Visual Components



<div dojoType="dojox.charting.widget.Chart2D"
     theme="dojox.charting.themes.Claro" id="viewsChart"
     style="width: 550px; height: 550px;">

    <!-- Pie Chart: add the plot -->
    <div class="plot" name="default" type="Pie"
     radius="200" fontColor="#000" labelOffset="-20"></div>

    <!-- pieData is the data source -->
    <div class="series" name="Last Week's Visits"
        array="chartData">
    </div>

</div>
Themes


<!--Legend Dialog-->
<div data-role="dialog" id="legendDialog"
  data-theme="f">
  <div data-role="header">
    <h1>Legend</h1>
  </div>
  <div data-role="content" >
    <div id="legendDiv"></div>
  </div>
</div>
The view port
Setting the mobile view port




<meta name="viewport" content="width=device-width,
   initial-scale=1, maximum-scale=1, user-scalable=no"/>
Setting the mobile view port

                             Minimum view port




<meta name="viewport" content="width=device-width,
   initial-scale=1, maximum-scale=1, user-scalable=no"/>




Zoom level on page load

                               Force map to scale - not the page
No viewport   With viewport
Map touch events


               No Change!



function init() {
        var map = new esri.Map(...);
        dojo.connect(map, "onClick", myClickHandler);
}
Styling via resolution & rotation


          CSS3 Media Queries
CSS3 Media Queries
Target specific devices by screen width

@media screen and (min-device-width:768px) and (max-device-width:1024px) {
/* styles go here */
}



Apply styles by device orientation

@media (orientation: landscape) {
/* styles go here */
}



Target high density screens such as iPhone 4

@media (-webkit-min-device-pixel-ratio: 2) {
/* high resolution device styles go here */
}
Listen for device rotation

var supportsOrientationChange = "onorientationchange" in window,
        orientationEvent =
            supportsOrientationChange ? "orientationchange" : "resize";

       window.addEventListener(orientationEvent,
               dojo.hitch(this,function(){
                    //... TODO
                    this.orientationChanged = orientationChanged;
                }), false
        );
Responsive Frameworks…(partial list)

                        The Boiler
   Boostrap                       Less+
                             Wirefy

              Foundation 3
                                      Titan
      Susy
                        Skeleton              Ingrid
Less Framework 4

                    jQuery
Demo
Putting it all together
Hybrid Web Apps




   Wrap your app with native framework.   Deploy to multiple platforms!
Hybrid Web Apps
Hybrid Web Apps

                  Direct access to:

                  GPS
                  Camera
                  Storage
                  Notification
Examples of Hybrid Web Apps
        http://www.phonegap.com/app
build.phonegap.com
Demo
Phonegap build
HTML5

        HTML + CSS3 + JavaScript




                                   HTML5 Logo by W3C
HTML5 APIs
•   Several new APIs
    -   Drag and drop API
    -   FileSystem API(s)
    -   Geolocation API
    -   Web Storage: localStorage/sessionStorage
    -   Web Workers (threaded JavaScript!)
    -   Cross-Origin Resource Sharing (CORS)
    -   Browser History
Web Storage API
•   5 MB limit vs. 4 KB per regular cookie
•   Stores key/value pairs
•   localStorage and sessionStorage

// Put the object into storage
localStorage.setItem(“address”, someAddress);

// Retrieve the object from storage
var userAddress = localStorage.getItem(“address”);


// Save data to a the current session's store
sessionStorage.setItem("username", "John");


// Access some stored data
var userName = sessionStorage.getItem("username"));
Geolocation API
•   Provides user’s approximate location
•   Opt-in only!




navigator.geolocation.getCurrentPosition(
    zoomToLocation, locationError
);

watchId = navigator.geolocation.watchPosition(
    updateLocation, locationError
);
Geolocation API
Understanding browsers




          !=         !=
caniuse.com
Feature detection pattern

useLocalStorage = supports_local_storage();

function supports_local_storage() {
   try {
     return 'localStorage' in window &&
        window['localStorage'] !== null;
   }
   catch( e ){
     return false;
   }
}

function doSomething() {
    if(useLocalStorage == true){
       //write to local storage
    }
    else {
         //degrade gracefully
    }
}
Test on different devices
Antoon Uijtdehaag, Esri Nederland
Technisch Consultant

auijtdehaag@esri.nl
@esrinederland



Andy Gup, Esri
Tech Lead for Web APIs and Android
Esri Developer Network

agup@esri.com
http://blog.andygup.net
@agup
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and Antoon Uijtdehaag

Mais conteúdo relacionado

Mais procurados

Navteq Developer Days - ArcGIS + POI
Navteq Developer Days - ArcGIS + POINavteq Developer Days - ArcGIS + POI
Navteq Developer Days - ArcGIS + POIAllan Laframboise
 
Building ArcGIS Mobile Solutions in the Cloud
Building ArcGIS Mobile Solutions in the CloudBuilding ArcGIS Mobile Solutions in the Cloud
Building ArcGIS Mobile Solutions in the CloudAllan Laframboise
 
Architecting the ArcGIS Platform
Architecting the ArcGIS PlatformArchitecting the ArcGIS Platform
Architecting the ArcGIS PlatformEsri UK
 
Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...
Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...
Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...Esri Nederland
 
NDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GIS
NDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GISNDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GIS
NDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GISNorth Dakota GIS Hub
 
Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...
Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...
Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...Esri Ireland
 
NDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS ProNDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS ProNorth Dakota GIS Hub
 
Working with arcgis online
Working with arcgis onlineWorking with arcgis online
Working with arcgis onlinezmmin383
 
ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014
ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014
ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014Geodata AS
 
Portal vs. ArcGIS Online
Portal vs. ArcGIS OnlinePortal vs. ArcGIS Online
Portal vs. ArcGIS OnlineSSP Innovations
 
NDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location Intelligence
NDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location IntelligenceNDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location Intelligence
NDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location IntelligenceNorth Dakota GIS Hub
 
NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC
NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC
NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC North Dakota GIS Hub
 
Working with ArcGIS Online
Working with ArcGIS OnlineWorking with ArcGIS Online
Working with ArcGIS OnlineEsri
 
Portal for ArcGIS – beste praksis - BK2016
Portal for ArcGIS – beste praksis - BK2016Portal for ArcGIS – beste praksis - BK2016
Portal for ArcGIS – beste praksis - BK2016Geodata AS
 
ArcGIS Server Javascript API
ArcGIS Server Javascript APIArcGIS Server Javascript API
ArcGIS Server Javascript APIewug
 
Esriuk_track5_pro_launch
Esriuk_track5_pro_launchEsriuk_track5_pro_launch
Esriuk_track5_pro_launchEsri UK
 
An Overview of Web GIS and Location Based Services
An Overview of Web GIS and Location Based ServicesAn Overview of Web GIS and Location Based Services
An Overview of Web GIS and Location Based Serviceswebmapsolutions
 

Mais procurados (20)

Navteq Developer Days - ArcGIS + POI
Navteq Developer Days - ArcGIS + POINavteq Developer Days - ArcGIS + POI
Navteq Developer Days - ArcGIS + POI
 
Building ArcGIS Mobile Solutions in the Cloud
Building ArcGIS Mobile Solutions in the CloudBuilding ArcGIS Mobile Solutions in the Cloud
Building ArcGIS Mobile Solutions in the Cloud
 
Architecting the ArcGIS Platform
Architecting the ArcGIS PlatformArchitecting the ArcGIS Platform
Architecting the ArcGIS Platform
 
Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...
Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...
Developer’s Guide to the ArcGIS Portal API, Esri, Julie Powell, Antoon Uijtd...
 
NDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GIS
NDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GISNDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GIS
NDGeospatialSummit2019 - ArcGIS Pro – Next-Generation Desktop GIS
 
Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...
Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...
Esri Ireland "ArcGIS - The Platform Story" Roadmap Session - Eamonn Doyle, Es...
 
NDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS ProNDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS Pro
 
Working with arcgis online
Working with arcgis onlineWorking with arcgis online
Working with arcgis online
 
ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014
ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014
ArcGIS for Server, Portal for ArcGIS and the Road Ahead - Esri norsk BK 2014
 
Portal vs. ArcGIS Online
Portal vs. ArcGIS OnlinePortal vs. ArcGIS Online
Portal vs. ArcGIS Online
 
NDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location Intelligence
NDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location IntelligenceNDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location Intelligence
NDGeospatialSummit2019 - ArcGIS Enterprise – Power Your Location Intelligence
 
NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC
NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC
NDGeospatialSummit2019 - What’s New with ArcGIS – Highlights From the 2019 UC
 
Working with ArcGIS Online
Working with ArcGIS OnlineWorking with ArcGIS Online
Working with ArcGIS Online
 
The 21st Century Harvard Map
The 21st Century Harvard MapThe 21st Century Harvard Map
The 21st Century Harvard Map
 
Portal for ArcGIS – beste praksis - BK2016
Portal for ArcGIS – beste praksis - BK2016Portal for ArcGIS – beste praksis - BK2016
Portal for ArcGIS – beste praksis - BK2016
 
Collector for ArcGIS
Collector for ArcGISCollector for ArcGIS
Collector for ArcGIS
 
ArcGIS Server Javascript API
ArcGIS Server Javascript APIArcGIS Server Javascript API
ArcGIS Server Javascript API
 
Esriuk_track5_pro_launch
Esriuk_track5_pro_launchEsriuk_track5_pro_launch
Esriuk_track5_pro_launch
 
An Overview of Web GIS and Location Based Services
An Overview of Web GIS and Location Based ServicesAn Overview of Web GIS and Location Based Services
An Overview of Web GIS and Location Based Services
 
High Accuracy Data Collection with Esri's Collector App
High Accuracy Data Collection with Esri's Collector AppHigh Accuracy Data Collection with Esri's Collector App
High Accuracy Data Collection with Esri's Collector App
 

Semelhante a Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and Antoon Uijtdehaag

3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.agup2009
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Webmikeleeme
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...
2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...
2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...GIS in the Rockies
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development LandscapeAmbert Ho
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Patrick Lauke
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Chris Griffith
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCritical Mass
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-airbrucelawson
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Adam Lu
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkSt. Petersburg College
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make itJonathan Snook
 

Semelhante a Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and Antoon Uijtdehaag (20)

3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
 
Location Based Services Without the Cocoa
Location Based Services Without the CocoaLocation Based Services Without the Cocoa
Location Based Services Without the Cocoa
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
 
Gup web mobilegis
Gup web mobilegisGup web mobilegis
Gup web mobilegis
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...
2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...
2013 URISA Track, Kickstarter for JavaScript Web and Mobile GIS Development b...
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learn
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-air
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 

Mais de Esri Nederland

Het verhaal achter kaarten
Het verhaal achter kaartenHet verhaal achter kaarten
Het verhaal achter kaartenEsri Nederland
 
Introduction to ArcGIS for Developers, Esri, Charles van der Put, Jim Barry
Introduction toArcGIS for Developers, Esri, Charles van der Put, Jim BarryIntroduction toArcGIS for Developers, Esri, Charles van der Put, Jim Barry
Introduction to ArcGIS for Developers, Esri, Charles van der Put, Jim BarryEsri Nederland
 
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn BoogaardFlex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn BoogaardEsri Nederland
 
Building good web_maps, Esri, Joris Bak
Building good web_maps, Esri, Joris BakBuilding good web_maps, Esri, Joris Bak
Building good web_maps, Esri, Joris BakEsri Nederland
 
Open data workshop modellen
Open data workshop modellenOpen data workshop modellen
Open data workshop modellenEsri Nederland
 

Mais de Esri Nederland (8)

Het verhaal achter kaarten
Het verhaal achter kaartenHet verhaal achter kaarten
Het verhaal achter kaarten
 
EGC2013 Mark Herbold
EGC2013 Mark HerboldEGC2013 Mark Herbold
EGC2013 Mark Herbold
 
Gin presentatie
Gin presentatieGin presentatie
Gin presentatie
 
Introduction to ArcGIS for Developers, Esri, Charles van der Put, Jim Barry
Introduction toArcGIS for Developers, Esri, Charles van der Put, Jim BarryIntroduction toArcGIS for Developers, Esri, Charles van der Put, Jim Barry
Introduction to ArcGIS for Developers, Esri, Charles van der Put, Jim Barry
 
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn BoogaardFlex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
Flex en silverlight viewer configuratie, Esri, Mark Jagt, Boudewijn Boogaard
 
Building good web_maps, Esri, Joris Bak
Building good web_maps, Esri, Joris BakBuilding good web_maps, Esri, Joris Bak
Building good web_maps, Esri, Joris Bak
 
Open data, nu!
Open data, nu!Open data, nu!
Open data, nu!
 
Open data workshop modellen
Open data workshop modellenOpen data workshop modellen
Open data workshop modellen
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and Antoon Uijtdehaag

  • 1. Agenda Goal: You’ll get an A to Z mobile web primer Why build mobile map apps? 3 Approaches Frameworks CSS3 & HTML5 Hybrid Map apps
  • 2. Who are your presenters? Antoon Uijtdehaag, Esri Nederland Technical Consultant Email: auijtdehaag@esri.nl Twitter @uijtdehaag Andy Gup, Esri Tech Lead for Web APIs and Android Esri Developer Network Email: agup@esri.com Twitter: @agup
  • 6. Mobile usage stats for my website? Web Server logs Web analytic tools
  • 7. Sample web-site stats from esri.com
  • 8. Your 3 Approaches Web app 1. + Native mobile app Web app 2. + Web mobile app (a.k.a Hybrid) 3. Web app only (Responsive)
  • 9. Many different screen sizes and pixel densities 1920x1080
  • 10. Wait…how do I pan and zoom the map??
  • 11. Hmmm…how many map layers do I load? VS. 1 GB RAM 16 GB RAM
  • 12. How come my map loads so slooow? VS. Mostly connected Always connected
  • 13. My survey crews use GPS heavily… VS. Limited battery Unlimited power
  • 14. resources.arcgis.com 1440 x 900 480 x 800 hdpi
  • 15. Mobile app – flip view port easily Portrait Landscape
  • 16. Desktop app on smartphone
  • 17. ArcGIS API for JavaScript - Compact http://esriurl.com/compactJS <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2compact">
  • 18. Why use the compact library? 32 modules vs. 80 modules Size Latency Compact Full
  • 19. Many mobile frameworks, such as… The challenge
  • 20. Mobile frameworks help with… Views Visual Components Themes
  • 21. Views Image courtesy Dojo
  • 22. Views <div id="mapView" dojoType="dojox.mobile.View“ style="width:100%;height:100%;"> <h1 dojoType="dojox.mobile.Heading" back="Back" moveTo="mainView"> 5 + 10 minute Drive Times </h1> <div id="map“ style="width:100%; height:100%;“/> </div>
  • 23. Visual Components <div dojoType="dojox.charting.widget.Chart2D" theme="dojox.charting.themes.Claro" id="viewsChart" style="width: 550px; height: 550px;"> <!-- Pie Chart: add the plot --> <div class="plot" name="default" type="Pie" radius="200" fontColor="#000" labelOffset="-20"></div> <!-- pieData is the data source --> <div class="series" name="Last Week's Visits" array="chartData"> </div> </div>
  • 24. Themes <!--Legend Dialog--> <div data-role="dialog" id="legendDialog" data-theme="f"> <div data-role="header"> <h1>Legend</h1> </div> <div data-role="content" > <div id="legendDiv"></div> </div> </div>
  • 26. Setting the mobile view port <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
  • 27. Setting the mobile view port Minimum view port <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/> Zoom level on page load Force map to scale - not the page
  • 28. No viewport With viewport
  • 29. Map touch events No Change! function init() { var map = new esri.Map(...); dojo.connect(map, "onClick", myClickHandler); }
  • 30. Styling via resolution & rotation CSS3 Media Queries
  • 31. CSS3 Media Queries Target specific devices by screen width @media screen and (min-device-width:768px) and (max-device-width:1024px) { /* styles go here */ } Apply styles by device orientation @media (orientation: landscape) { /* styles go here */ } Target high density screens such as iPhone 4 @media (-webkit-min-device-pixel-ratio: 2) { /* high resolution device styles go here */ }
  • 32. Listen for device rotation var supportsOrientationChange = "onorientationchange" in window, orientationEvent = supportsOrientationChange ? "orientationchange" : "resize"; window.addEventListener(orientationEvent, dojo.hitch(this,function(){ //... TODO this.orientationChanged = orientationChanged; }), false );
  • 33. Responsive Frameworks…(partial list) The Boiler Boostrap Less+ Wirefy Foundation 3 Titan Susy Skeleton Ingrid Less Framework 4 jQuery
  • 35. Hybrid Web Apps Wrap your app with native framework. Deploy to multiple platforms!
  • 37. Hybrid Web Apps Direct access to: GPS Camera Storage Notification
  • 38. Examples of Hybrid Web Apps http://www.phonegap.com/app
  • 41. HTML5 HTML + CSS3 + JavaScript HTML5 Logo by W3C
  • 42. HTML5 APIs • Several new APIs - Drag and drop API - FileSystem API(s) - Geolocation API - Web Storage: localStorage/sessionStorage - Web Workers (threaded JavaScript!) - Cross-Origin Resource Sharing (CORS) - Browser History
  • 43. Web Storage API • 5 MB limit vs. 4 KB per regular cookie • Stores key/value pairs • localStorage and sessionStorage // Put the object into storage localStorage.setItem(“address”, someAddress); // Retrieve the object from storage var userAddress = localStorage.getItem(“address”); // Save data to a the current session's store sessionStorage.setItem("username", "John"); // Access some stored data var userName = sessionStorage.getItem("username"));
  • 44. Geolocation API • Provides user’s approximate location • Opt-in only! navigator.geolocation.getCurrentPosition( zoomToLocation, locationError ); watchId = navigator.geolocation.watchPosition( updateLocation, locationError );
  • 48. Feature detection pattern useLocalStorage = supports_local_storage(); function supports_local_storage() { try { return 'localStorage' in window && window['localStorage'] !== null; } catch( e ){ return false; } } function doSomething() { if(useLocalStorage == true){ //write to local storage } else { //degrade gracefully } }
  • 49. Test on different devices
  • 50.
  • 51. Antoon Uijtdehaag, Esri Nederland Technisch Consultant auijtdehaag@esri.nl @esrinederland Andy Gup, Esri Tech Lead for Web APIs and Android Esri Developer Network agup@esri.com http://blog.andygup.net @agup

Notas do Editor

  1. Demographics app
  2. http://www.esri.com/site/pdfs/visitorprofile_q3_2011.pdf
  3. http://mobile.businessweek.com/articles/2012-09-13/the-4g-era-arrives-how-much-will-you-pay
  4. Arcgis.com
  5. Arcgis.comhttp://help.arcgis.com/en/webapi/javascript/arcgis/index.htmlhttp://help.arcgis.com/en/webapi/javascript/arcgis/mobile/index.html&lt;Ctrl&gt;+&lt;PageUp&gt;&lt;Ctrl&gt;+&lt;PageDown&gt;&lt;Crtl&gt;+&lt;Shift&gt;+M
  6. http://esriurl.com/compactJSIf your are building Mobile Apps using the ArcGIS Api for Javascript. You can go for the compact build of the serverapi.This compact version of the JavaScript API was designed for building applications where slower internet speeds and network latency is an issue.For example, on a 3G mobile device, where you want the smallest possible download. This compact build is also a great option if you want to leverage a JavaScript toolkit other than Dojo.To use the compact build, add the following script tag to your application.
  7. What are the primary differences between compact build and standard build.The compact build removes the dependency on the dijit namespace upon initial download, meaning that if you don&apos;t need the dojo dijits they won&apos;t be loaded. A side-effect of this is that a new info window and slider are provided.The compact build includes 32 of the commonly used modules (compared to 80 in the standard). If your application requires objects from modules not included in the compact build you will need to load them using dojo.require. For example, if you want to perform geoprocessing with the compact build you will need to add the following dojo.require statement to your application.dojo.require(&quot;esri.tasks.gp&quot;);These two features reduce the size of the build by 53 Kb gzipped. Less JavaScript code to execute means less work the browser has to do.
  8. To help you rapidly deploy cross-platform mobile apps and websites, there’s a wide range of JavaScript frameworks you can take advantage of.Some common characteristics of JavaScript mobile web development frameworks:Optimized for touchscreen devices: Fingers as input devices instead of mouse cursors provide an extra set of challenges in user interface design. Mobile web development frameworks provide standard UI elements and event-handling specifically for mobile device platforms.Cross-platform: Support for multiple mobile device platforms such iOS and Android allows you to get your app to a wide range of users.Lightweight: Because of current bandwidth limitations, a stronger emphasis on lowering file weight is placed into mobile web development frameworks.Uses HTML5 and CSS3 standards: Most mainstream mobile devices have web browsers that support HTML5 and CSS3, and so mobile web development frameworks take advantage of new features available in these upcoming W3C specifications for a better user experience.http://sixrevisions.com/javascript/mobile%C2%A0web-development-frameworks/http://www.sencha.com/http://jquerymobile.com/http://dojotoolkit.org/features/mobile
  9. http://dojotoolkit.org/reference-guide/1.8/dojox/mobile.htmlhttp://docs.sencha.com/touch/2-0/#!/api
  10. jQuery
  11. Locks entire window. Focuses pinch zoom on components (e.g. map).Pinch zoom not available on Android 3+ until ArcGIS API for JavaScript v3.2
  12. https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag
  13. Andy
  14. http://speckyboy.com/2012/08/21/15-more-responsive-css-frameworks-boilerplates-worth-considering/
  15. http://edn1.esri.com/jsdevstarter/device_sim/index.html
  16. Let’s talk about building Hybrid Web App. You can wrap your Javascriptapp with a native framework. And deploy it to multiple platforms, like iOS, Android and Windows Phone.
  17. You can do the same thing with iOSAntoon
  18. http://phonegap.com/2012/03/19/phonegap-cordova-and-what%E2%80%99s-in-a-name/From the outside a hybrid app acts like a native app. Once build the app acts as native app and can be sold or given away in the various app stores.
  19. http://phonegap.com/2012/03/19/phonegap-cordova-and-what%E2%80%99s-in-a-name/Big advantage of using a hybrid framework is that its enables you to access device specific features. Like the Camera or Gallery. Direct access to storage of even use notifications.
  20. http://venturebeat.com/2012/05/02/linkedin-ipad-app-engineering/#s:1-linkedin-ipadhttp://www.mobilemarketer.com/cms/news/software-technology/13786.htmlOne of the frameworks out there is PhoneGap.PhoneGap is an open source solution for building cross-platform mobile apps with standards-based Web technologies like HTML, JavaScript, CSS.There are a lot of apps out there using this Hybrid technology. But recently facebook decided to redesign their apps and go native. Not an easy path to go.
  21. Theres a cloud based solution for packaging your apps is called PhoneGap build.WithPhoneGap build, the packaging process can be done in the cloud.Simply upload your HTML5, CSS, and JavaScript assets to the Adobe® PhoneGap™ Build cloud service and they do the work of compiling for you.
  22. http://edn1.esri.com/jsdevstarter/device_sim/index.html
  23. Andy
  24. Modernizr
  25. Be careful when reusing desktop content on the mobile web