Starting Fresh with JavaScript 4.x

Slides:



Advertisements
Similar presentations
Esri International User Conference | San Diego, CA Technical Workshops | What is a Web Application? Ben Ramseth July 13, 2011.
Advertisements

Esri Maps for Salesforce and Microsoft Dynamics CRM
Esri International User Conference | San Diego, CA Technical Workshops | ArcGIS Viewer for Flex An Introduction Canserina Kurnia and Derek Law July 12,
Esri International User Conference | San Diego, CA Technical Workshops | ArcGIS for SharePoint, An Introduction Art Haddad Rich Zwaap.
Sharing Geographic Content
Introduction to ArcGIS API for JavaScript
Technical Workshops | Esri International User Conference San Diego, California Esri Maps for IBM Cognos Dave Kerr Darren Nelson July 2012.
Building Offline Apps With the ArcGIS Runtime SDKs
Extending ArcGIS for Server
Enabling High-Quality Printing in Web Applications
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Road Ahead - ArcGIS.
Introduction to Web AppBuilder for ArcGIS: JavaScript Apps Made Easy
Using the Operations Dashboard for ArcGIS Jay Chen / Tif Pun.
Extend the Operations Dashboard with Custom Widgets (and more)
Esri UC 2014 | Technical Workshop | Operations Dashboard for ArcGIS: Extending the Functionality Jay Chen Kylie Donia Tif Pun.
Extending the Operations Dashboard
Road Ahead for Vector Mapping
Advanced workflows for creating 3D Web Scenes in ArcGIS Online Javier Gutierrez and Janett Baresel.
Developing Cross Platform Apps with the ArcGIS Runtime SDK for Qt
Model View ViewModel Architecture. MVVM Architecture components.
Esri UC 2014 | Technical Workshop | ArcGIS API for JavaScript: An Introduction Kelly Hutchins Derek Swingley.
ArcGIS API for JavaScript Building 3D Web Apps
Interactive Geospatial Analysis with SAS Portal Falko Schulz Senior Technology Presales Consultant SAS Institute Australia.
Esri UC 2016 | Demo Theater | Esri Maps for MicroStrategy: Location Architect Chaka Clarke.
Deploying ArcGIS at a Small Utility Michael Miller Pat Dolan Howard Crothers.
QML and JavaScript for Native App Development Michael Tims Jen Trieu.
Sharing Maps and Layers to Portal for ArcGIS Melanie Summers, Tom Shippee, Ty Fitzpatrick.
Secured Services Best Practices on ArcGIS for Server Patrick Jackson & Thomas Noble.
ArcGIS for Server Security: Advanced
ArcGIS for the Military: Creating and Sharing Military Overlays
Bill Major G67940_UC15_Tmplt_16x9_4-15
Jeff Barrette Jeff Moulds
Geospatial Research & Solutions GIS.ASU.EDU
Real-Time GIS Leveraging Stream Services
Configuring My Elected Representative and Election Results in Your Community Lindsay Thomas.
ArcGIS API for javascript
Esri Maps for MicroStrategy: Enhance Your BI Reporting
Configuring Portal for ArcGIS to Perform Network Analysis
ArcGIS Data Reviewer: Assessing Positional Accuracy
Mapping for the interwebs
Administering Members in Your Organization
ArcGIS Workflow Manager: Advanced Workflows and Concepts
ArcGIS Geocoding What’s New and the Road Ahead
Deploying ArcGIS at an Gas Utility
Deploying ArcGIS for Water
App Configuration, Customization or Development
Working with Feature Layers
Geocoding with ArcGIS Online
Collector: Authoring Maps for Offline Data Collection
ArcGIS Online Elevation Services: Visualization and Analysis
Using the Community Maps Contributor App
PYTHON: AN INTRODUCTION
Deploying ArcGIS at a Telecommunication Organization
Accessing Spatial Information from MaineDOT
Esri Maps for IBM Cognos: Enhance Your BI Reporting
Shankar Chandrasekaran
Creating Geoprocessing Services
ArcGIS Data Reviewer: Quality Assessment for Elevation Raster Datasets
Getting started with ArcGIS API for JavaScript
Web AppBuilder for ArcGIS
Network Analysis using Python
Best Practices: Authoring Maps for Field Use
ArcGIS Online: Items Administration and Group Sharing
Combining ArcGIS for Server & ArcGIS Online
Tile layers, map image layers, and on-premises Web GIS
Top 10 ArcGIS API for JavaScript Skills
Introduction to Portal for ArcGIS
ArcGIS Pro: An Introduction Overview
Hosting Geodesign and Analysis Services in Your Portal for ArcGIS
LEVERAGING VECTOR TILE LAYERS IN WEB APPS
Presentation transcript:

Starting Fresh with JavaScript 4.x Marla Kostuk Bradley Snider

Demo overview Benefits of the new API Starting fresh Maps and Views 3D extents Ground UI Widgets and ViewModels Properties Promises Questions

About the ArcGIS API for JavaScript 4.0 Reimagine the API in terms of its support for both 2D and 3D, its ease of use as a JavaScript API, its ability to work with map and layer web resources stored as items in the ArcGIS geoinformation model and its support for building engaging and elegant user experiences.

ArcGIS API for JavaScript 4.0: Reimagining the API Make a 3D map as easily as a 2D map Easily integrate with your web GIS Author, manage, and mash-up layers using layer items Build a great user experience Create meaningful visualizations of your data Enable interactivity using the local geometry engine Bring in vector tile layers Login to the platform and access secured content Integrate GIS workflows using tasks Work with 3rd Party Tools

Why do I need to start fresh? The cleanest approach is to re-write apps from scratch when building with the 4.x API 4.x is a substantial overhaul of the ArcGIS API for JavaScript Significant changes to the object model in order to enable higher productivity and effectiveness. MapViews and SceneViews now handle data visualization within 2D and 3D maps, respectively Methods are no longer needed to get and set properties Watch properties Asynchronous promises Widgets now handle styling and business logic separately, with widget and widgetModel classes 3D SceneViews have camera (view point) and center (focus) properties Parody - Not all 3.x capabilities are included in the initial 4.x release. Does the app need 3D visualization? If so, use 4.x. Do you need a particular functionality from 3.x that's not yet available in 4.x? https://developers.arcgis.com/javascript/latest/guide/functionality-matrix/index.html

Maps and views 4.x adds a key class; the view Map – holds the data Base layers Operational layers Ground (3D, more on this later) View – Contains the visualization information for the data Extent (2D) Center and camera (3D, more on this later) UI (widgets, padding, etc.)

Map instantiation 4.x 3.x var map = new Map({ basemap: "streets" });   var view = new MapView({ container: "viewDiv", map: map, // references map object center: [-118, 34.5], zoom: 8, var map = new Map("mapDiv", { center: [-118, 34.5], zoom: 8, basemap: "streets" });

3D: SceneView Center – focal point Camera – vantage point Heading X, Y, Z Center – focal point X, Y, Z Camera – vantage point Heading 0 - 360° Tilt 0 - 90° Tilt X, Y, Z

demo 3D Extents

Map instantiation 4.x: 3D SceneView 4.X: 2D MapView var view = new SceneView({ container: "viewDiv", map: map, // references map object camera: { position: [-118, 34.5, 707], tilt: 81, heading: 50 } }); 4.X: 2D MapView var view = new MapView({ container: "viewDiv", map: map, // references map object center: [-118, 34.5], zoom: 8, }); center: { position: [-118, 34.5, 207] }, camera: { position: [-115.2, 51.2, 722207] }

demo Ground

Toggle the ground elevation Instantiate with ground elevation map.ground.layers.forEach(function(layer) { layer.visible = layer.visible ? false : true; }); var map = new Map({ basemap: "streets“, ground: "world-elevation“ }); Add an elevation layer var elevationLayer = new ElevationLayer({ url: "https://server.domain.com...“, visible: true });

View UI ui: { components: ["zoom", "compass", "attribution", "home"], padding: 20 }, … view.ui.add(toggle, "top-right");

Widgets 4.x separates the styling and business logic All widgets now have a ViewModel, used to customize the user experience and interface. Benefits: Easier to share logic between widgets and code bases Easier to work with other frameworks, such as Bootstrap Much cleaner code

Widgets

Widgets Note how much cleaner the 4.x code is. 3.x 4.x

Get Properties Directly from Object

Get Properties Let the get() function do the work

Set Properties On the object

Set Properties Use the set() function

Watch Properties .watch(property, callback)

demo

Promises Understand .then()

demo

Thank you! Marla Kostuk Bradley Snider

Please take our Survey Find your event in the Esri Events App Your feedback allows us to help maintain high standards and to help presenters Find your event in the Esri Events App Find the session you want to review Scroll down to the bottom of the session Answer survey questions and submit