This document summarizes a presentation on developing Android applications with ArcGIS Server. It discusses what Android is, pros and cons of choosing Android over iPhone, how to get started with Android development, design considerations for mobile apps, and how to integrate ArcGIS Server data and services using REST APIs and the Google Maps API. Code examples are provided for creating map overlays with WMS tiles and collecting and posting field data to a feature service.
By now you have heard about Flash Augmented Reality and how it is taking the Flash Development community by storm! Whether you are looking for how to get started, how to improve your own experiments or have a client who desperately needs AR on their site, this session is for you.
In this keynote I cover getting up and running as well as the ideal workflow for testing/deploying your creation. I also cover the basics then quickly move into how to build a FLAR Emulator for easy testing/debugging as well as general usability/performance issues. Finally we will look at my own experiments with AR, how they were built and highlight some of the best uses of Flash AR today.
The goal of this presentation is to teach you how to build a solid reusable foundation for all of your Flash AR projects which will allow you to quickly prototype your ideas. All code covered in this session is open source and free to use. Documentation on how it works will also be handed out as well.
Звиад Кардава "Android Things + Google Weave" IT Event
Android Things - новая операционная система от Google на базе Android, которая специально разработана для IoT. Теперь каждый Android разработчик сможет легко и быстро разрабатывать "умные вещи". Что интересно, Google полностью берет на себя задачу поддержки Board Support Package (BSP) и обновлений ОС. Такой подход позволяет дать разработчикам доверенную платформу для разработки своих IoT продуктов. Вместе с Android Things также был представлен и новый коммуникационный протокол для IoT под названием Weave. Эти продукты призваны расширить IoT платформу Google и дать разработчикам простые и знакомые им инструменты для разработки продуктов. Звиад подробно расскажет о том что такое Android Things и Weave. Чем новая ОС отличается от обычного Android, какие в ней есть особенности, как под неё разрабатывать и прямо на сцене вместе с гостями напишет небольшое демо приложение.
In this talk I demonstrated how easy Dojo is integrating into the Adobe AIR runtime. Using a performance analysis tool I demonstrated how to use charting, grids and other features of Adobe AIR and the Dojo Toolkit
By now you have heard about Flash Augmented Reality and how it is taking the Flash Development community by storm! Whether you are looking for how to get started, how to improve your own experiments or have a client who desperately needs AR on their site, this session is for you.
In this keynote I cover getting up and running as well as the ideal workflow for testing/deploying your creation. I also cover the basics then quickly move into how to build a FLAR Emulator for easy testing/debugging as well as general usability/performance issues. Finally we will look at my own experiments with AR, how they were built and highlight some of the best uses of Flash AR today.
The goal of this presentation is to teach you how to build a solid reusable foundation for all of your Flash AR projects which will allow you to quickly prototype your ideas. All code covered in this session is open source and free to use. Documentation on how it works will also be handed out as well.
Звиад Кардава "Android Things + Google Weave" IT Event
Android Things - новая операционная система от Google на базе Android, которая специально разработана для IoT. Теперь каждый Android разработчик сможет легко и быстро разрабатывать "умные вещи". Что интересно, Google полностью берет на себя задачу поддержки Board Support Package (BSP) и обновлений ОС. Такой подход позволяет дать разработчикам доверенную платформу для разработки своих IoT продуктов. Вместе с Android Things также был представлен и новый коммуникационный протокол для IoT под названием Weave. Эти продукты призваны расширить IoT платформу Google и дать разработчикам простые и знакомые им инструменты для разработки продуктов. Звиад подробно расскажет о том что такое Android Things и Weave. Чем новая ОС отличается от обычного Android, какие в ней есть особенности, как под неё разрабатывать и прямо на сцене вместе с гостями напишет небольшое демо приложение.
In this talk I demonstrated how easy Dojo is integrating into the Adobe AIR runtime. Using a performance analysis tool I demonstrated how to use charting, grids and other features of Adobe AIR and the Dojo Toolkit
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!FITC
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
Virtual Reality development has become very active recently, with the availability of low cost and high quality headsets, motion tracking equipment, and sensors. However, most VR app development is happening natively — users are stuck in the days of needing to download the right binary, trust a third-party that their code isn’t malicious and fix compatibility issues. Developers need to target multiple platforms, thus often ignoring those with fewer users. Instead, wouldn’t it be great if high quality VR content could be delivered through the Web?
In this session, Vladimir Vukicevic will address additions to HTML, CSS, and WebGL that Mozilla is experimenting with which allow Web developers to create immersive VR experiences. Everything from pure VR WebGL content to responsive HTML and CSS that can shift from mobile to tablet to desktop to VR will be covered. Additionally, Vladimir will discuss delivering VR video via the Web, as well as how to mix WebGL and CSS content in a true 3D space.
OBJECTIVE
To show how VR and the Web work together, and the techniques for bringing VR content to the Web.
TARGET AUDIENCE
Web developers and designers
ASSUMED AUDIENCE KNOWLEDGE
Some knowledge of at least one of WebGL, CSS 3D Transforms, or modern 3D graphics would be helpful.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
An overview of current VR devices, their capabilities and how they can interface with the Web.
How to render WebGL content to a VR device.
How to create documents using HTML and CSS that can be projected in VR.
How to create responsive documents that can shift in and out of VR based on user choice.
How WebGL and CSS content can be mixed, providing interactive 3D graphics but with the full power of HTML for non-3D elements.
Cartographie mobile implantée au service de police de la ville de QuébecACSG Section Montréal
Le service de police de la ville de Québec a procédé à l'implantation d'une nouvelle solution de cartographie mobile pour toutes les auto-patrouilles du territoire de Québec. Cette solution centrée sur la carte (« map-centric ») devait répondre à une multitude de besoins émis par le service de police. Elle devait premièrement intégrer et présenter la cartographie détaillée de la Ville de Québec. La solution devait se connecter sur plusieurs systèmes externes afin de présenter l’information de façon simple et rapide : • systèmes de répartition par ordinateur 911 ; • système de positionnement GPS ; • système de parcours (« routing ») ; • base de données de photos des bâtiments ; • base de données cadastrale ; • planification opérationnelle des événements spéciaux. La solution devait aussi permettre à tous les utilisateurs d’échanger de l’information directement sur la carte (géocollaboration). De plus, la solution devait être déployée dans un environnement où certaines contraintes posaient réellement un défi. La bande passante allouée était de 3 à 7 Mo par jour par véhicule sur des produits mobiles aux performances restreintes. La notion de convivialité a aussi été abordé et une interface utilisateur « touch » a été développée spécialement pour répondre aux besoins. Nous présenterons en détails les besoins, les défis ainsi que les solutions mises en œuvre par l'équipe pour le développement et le déploiement d'une telle solution dans l’environnement du service de police de la ville de Québec.
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016Blue Raster
Jon Nordling presents with Jo Fraley (Esri) on how to build native GIS apps faster with AppStudio for ArcGIS. Native apps give the best user experience, particularly on smart phones and tablets. Native apps can also run while disconnected from the network and can be published in the Google Play and Apple app stores. In this workshop, we will introduce AppStudio for ArcGIS and how you can easily and quickly assemble fully functional mapping apps that run pretty much anywhere - on a smartphone, a tablet, and even on Windows and Mac operating systems. Explore how to distribute your own apps within the enterprise as well as in the public app stores. Understand how to use QML and JavaScript to start developing your own apps using provided templates or from scratch. Adrienne Allegretti from Blue Raster will also show the art of the possible of how you can go from the out of the box apps to creating your own custom apps using the developer edition of AppStudio for ArcGIS.
Ce premier cours introduit à plusieurs aspects liés au développement informatique. Le cours présente comment versioner son code avec le système Git et comment le déployer avec Heroku. Il présente ensuite comment débugguer avec le module pdb et comment profiler son code avec les modules timeit et profile. Enfin, le cours termine en présentant le concept de tests unitaires que l'on peut construire avec les modules doctest et unittest.
Développement d’une Application Mobile Android StreetArtPlanetSlim Namouchi
Mon stage de fin d’études est effectué au sein de la société britannique ERP Business Solutions Limited. Cette entreprise est installée au Palladium House London United Kingdom. Ce stage consiste à réaliser une application mobile Andoid intitulée StreetArtPlanet destinée aux amateurs de l'art de la rue leurs permettant d'identifier, retrouver et suivre les créations de l'art urbain.
Cette présentation montre plusieurs outils gratuits qui peuvent être utilisés pour gérer plusieurs aspects de la gestion de projets, en particulier informatique, de manière collaborative. On y voit comment versioner son code avec Git, déployer son code avec Heroku, tester son code avec Travis, gérer et planifier son temps et ses tâches avec Trello, FreedCamp et Tom'splanner, comment communiquer avec Slack et comment rédiger sa documentation avec Read the Docs.
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!FITC
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
Virtual Reality development has become very active recently, with the availability of low cost and high quality headsets, motion tracking equipment, and sensors. However, most VR app development is happening natively — users are stuck in the days of needing to download the right binary, trust a third-party that their code isn’t malicious and fix compatibility issues. Developers need to target multiple platforms, thus often ignoring those with fewer users. Instead, wouldn’t it be great if high quality VR content could be delivered through the Web?
In this session, Vladimir Vukicevic will address additions to HTML, CSS, and WebGL that Mozilla is experimenting with which allow Web developers to create immersive VR experiences. Everything from pure VR WebGL content to responsive HTML and CSS that can shift from mobile to tablet to desktop to VR will be covered. Additionally, Vladimir will discuss delivering VR video via the Web, as well as how to mix WebGL and CSS content in a true 3D space.
OBJECTIVE
To show how VR and the Web work together, and the techniques for bringing VR content to the Web.
TARGET AUDIENCE
Web developers and designers
ASSUMED AUDIENCE KNOWLEDGE
Some knowledge of at least one of WebGL, CSS 3D Transforms, or modern 3D graphics would be helpful.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
An overview of current VR devices, their capabilities and how they can interface with the Web.
How to render WebGL content to a VR device.
How to create documents using HTML and CSS that can be projected in VR.
How to create responsive documents that can shift in and out of VR based on user choice.
How WebGL and CSS content can be mixed, providing interactive 3D graphics but with the full power of HTML for non-3D elements.
Cartographie mobile implantée au service de police de la ville de QuébecACSG Section Montréal
Le service de police de la ville de Québec a procédé à l'implantation d'une nouvelle solution de cartographie mobile pour toutes les auto-patrouilles du territoire de Québec. Cette solution centrée sur la carte (« map-centric ») devait répondre à une multitude de besoins émis par le service de police. Elle devait premièrement intégrer et présenter la cartographie détaillée de la Ville de Québec. La solution devait se connecter sur plusieurs systèmes externes afin de présenter l’information de façon simple et rapide : • systèmes de répartition par ordinateur 911 ; • système de positionnement GPS ; • système de parcours (« routing ») ; • base de données de photos des bâtiments ; • base de données cadastrale ; • planification opérationnelle des événements spéciaux. La solution devait aussi permettre à tous les utilisateurs d’échanger de l’information directement sur la carte (géocollaboration). De plus, la solution devait être déployée dans un environnement où certaines contraintes posaient réellement un défi. La bande passante allouée était de 3 à 7 Mo par jour par véhicule sur des produits mobiles aux performances restreintes. La notion de convivialité a aussi été abordé et une interface utilisateur « touch » a été développée spécialement pour répondre aux besoins. Nous présenterons en détails les besoins, les défis ainsi que les solutions mises en œuvre par l'équipe pour le développement et le déploiement d'une telle solution dans l’environnement du service de police de la ville de Québec.
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016Blue Raster
Jon Nordling presents with Jo Fraley (Esri) on how to build native GIS apps faster with AppStudio for ArcGIS. Native apps give the best user experience, particularly on smart phones and tablets. Native apps can also run while disconnected from the network and can be published in the Google Play and Apple app stores. In this workshop, we will introduce AppStudio for ArcGIS and how you can easily and quickly assemble fully functional mapping apps that run pretty much anywhere - on a smartphone, a tablet, and even on Windows and Mac operating systems. Explore how to distribute your own apps within the enterprise as well as in the public app stores. Understand how to use QML and JavaScript to start developing your own apps using provided templates or from scratch. Adrienne Allegretti from Blue Raster will also show the art of the possible of how you can go from the out of the box apps to creating your own custom apps using the developer edition of AppStudio for ArcGIS.
Ce premier cours introduit à plusieurs aspects liés au développement informatique. Le cours présente comment versioner son code avec le système Git et comment le déployer avec Heroku. Il présente ensuite comment débugguer avec le module pdb et comment profiler son code avec les modules timeit et profile. Enfin, le cours termine en présentant le concept de tests unitaires que l'on peut construire avec les modules doctest et unittest.
Développement d’une Application Mobile Android StreetArtPlanetSlim Namouchi
Mon stage de fin d’études est effectué au sein de la société britannique ERP Business Solutions Limited. Cette entreprise est installée au Palladium House London United Kingdom. Ce stage consiste à réaliser une application mobile Andoid intitulée StreetArtPlanet destinée aux amateurs de l'art de la rue leurs permettant d'identifier, retrouver et suivre les créations de l'art urbain.
Cette présentation montre plusieurs outils gratuits qui peuvent être utilisés pour gérer plusieurs aspects de la gestion de projets, en particulier informatique, de manière collaborative. On y voit comment versioner son code avec Git, déployer son code avec Heroku, tester son code avec Travis, gérer et planifier son temps et ses tâches avec Trello, FreedCamp et Tom'splanner, comment communiquer avec Slack et comment rédiger sa documentation avec Read the Docs.
Présentation effectuée le 20 mai 2010 à Montréal. Elle couvre les différentes options disponibles aux utilisateurs des produits ESRI pour ajouter le volet de mobilité à leur SIG.
Non Conventional Android Programming Enguest9bcef2f
Learn as you can developing software for mobile devices using only html, css and javascript and how you can use Spring Framework in software for mobile devices
Non Conventional Android Programming (English)Davide Cerbo
Learn as you can developing software for mobile devices using only html, css and javascript and how you can use Spring Framework in software for mobile devices
The debug process constitutes an important part in an app's development cycle. Knowing the (right) tools and techniques means you can optimizes time and therefore costs. In this session we will see a number of techniques to optimize debugging of iOS applications exploiting the power of Xcode, LLDB and other support tools.
My presentation on Android to the Ruby Users of Minnesota group. Introduces the platform, demo applications I wrote and how to list your app in the Android market.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
How world-class product teams are winning in the AI era by CEO and Founder, P...
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
1. Android Development with ArcGIS Server Esri Dev Meet Up Charlotte, NC October 19th, 2010 Jim Tochterman, VP - Research & Development www.bcs-gis.com www.facebook.com/bcsgis www.twitter.com/bcsgis
2. What is Android? Software stack for mobile devices, formally introduced in 2008 Unlike other mobile devices, not a proprietary OS iOS Palm OS Blackberry OS Combination of three (3) components Free, open source OS for mobile devices Free, open source development environment for creating mobile applications Devices that run the Android OS and the applications created for it http://developer.android.com/guide/basics/what-is-android.html
3. Why choose Android over iPhone? Customers: iPhone cost was prohibitive for widespread deployment No Objective-C / Cocoa developers on staff No Mac hardware available Technical Limitations / General Annoyances: GSM coverage is not good in the Southeast (even in Urban Areas) iPhone did not support “backgrounding” (at the time) Deployment Hurdles (App Store, Code Signing, etc.) Xcode is quite possibly the worst IDE ever! Comfort Level: If you do Flex or Java development already the tools are very similar!
4. Why develop with Android? Background Services Event driven model that works silently while other applications are being used. Shared Data & Inter-Process Communication Applications can exchanges messages, perform processing, and share data. Widgets & Live Folders Allows you to create windows into your applications from your device’s home screen. Application Equality No differentiation between native applications and those developed by third parties.
5. Pros & Cons with Android Development Pros: Good Development Tools and Samples No App Store / Market Requirement! Build and Deploy with Dropbox if you feel like it Cons: Terminology! What in the hell is an Activity and a Intent!? (The names can seem strange, but based upon what they do) More work to make a “Pretty” app
6. Where Do I Get Started? Download Eclipse (or my preference MotoDev Studio) http://www.eclipse.org/downloads http://developer.motorola.com/docstools/motodevstudio/download Download Android ADT and SDK http://developer.android.com/sdk/index.html Start Playing!
7. Design Considerations For Mobile Devices Low Processing Speed Optimize code to run quick and efficiently Limited storage & memory Minimize application size Reuse and share data (using databases & saved files) Limited bandwidth & high latency Allow for slow, intermittent network connections Limited Battery Life Avoid expensive operations where/when possible Limit sensor access when not being used
8. How do I use ArcGIS Server with Android? ArcGIS API for Android is coming! Finally!! http://resources.arcgis.com/content/arcgis-android/api
9. How do I use ArcGIS Server with Android now!? Sign up for the Early Adopter Program – OR - arcgis4android@esri.com Use ArcGIS Server REST API & Web Services! WMS Service provides Map Tiles for Overlays Feature Service provides ability to retrieve and/or edit data
11. Creating Map Overlay (MainActivity.java) public class MainActivity extends MapActivity implements OnSharedPreferenceChangeListener { private final static String TAG = "MainActivity"; MyMapViewmyMapView; MapControllermapController; LocationManagerlocationManager; MyCustomLocationOverlaymyLocationOverlay; WMSOverlayAtlanticStormsOverlay; … AtlanticStormsOverlay = new WMSOverlay("http://aws.bcs-gis.com/arcgis/services/Storms/Atlantic/MapServer/WMSServer?", layerIds, myMapView); overlays.add(AtlanticStormsOverlay ); … }
12. Creating Map Overlay (WMSOverlay.java) public class WMSOverlay extends Overlay { private final static String TAG = ”WMSOverlay"; WMSLoaderwmsClient; … public WMSOverlay(Stringurl, String layers, MapViewmapView) { … wmsClient = new WMSLoader(url, layers); intleftLongitude = mapView.getMapCenter().getLongitudeE6() - mapView.getLongitudeSpan()/2; intrightLongitude = mapView.getMapCenter().getLongitudeE6()+ mapView.getLongitudeSpan()/2; intupperLatitude = mapView.getMapCenter().getLatitudeE6() + mapView.getLatitudeSpan()/2; intlowerLatitude = mapView.getMapCenter().getLatitudeE6() - mapView.getLatitudeSpan()/2; GeoPointupperLeft = new GeoPoint(upperLatitude,leftLongitude); GeoPointlowerRight = new GeoPoint(lowerLatitude,rightLongitude); image = wmsClient.loadMap(mapView.getWidth(), mapView.getHeight(), upperLeft, lowerRight); } }
13. Creating Map Overlay (WMSLoader.java) public class WMSLoader { public static String TAG = "WMSLoader"; public String serverUrl; public String layerIds; … public Bitmap loadMap(int width, int height, GeoPointul, GeoPointlr) { URL url = null; try { url = new URL(String.format(serverUrl + "LAYERS=" + layerIds + "&TRANSPARENT=true&FORMAT=image/ png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/ vnd.ogc.se_inimage&SRS=EPSG:4326" + "" + "&BBOX=%f,%f,%f,%f&WIDTH=%d&HEIGHT=%d", ul.getLongitudeE6()/1E6, lr.getLatitudeE6()/1E6, lr.getLongitudeE6 ()/1E6, ul.getLatitudeE6()/1E6, width, height)); … Bitmap image = BitmapFactory.decodeStream(input); return image; } }
14. Creating Data via REST API (MainActivity.java) public class MainActivity extends MapActivity implements OnSharedPreferenceChangeListener { … @Override public booleanonCreateOptionsMenu(Menu menu) { boolean result = super.onCreateOptionsMenu(menu); … menu.add(0, 996, Menu.NONE, "SITREP Notes").setIcon(android.R.drawable.ic_menu_myplaces); … } @Override public booleanonOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item); Intent mapIntent = new Intent(Intent.ACTION_VIEW); switch (item.getItemId()) { … case (996) : Intent dca = new Intent(this, DataCollectionActivity.class); startActivityForResult(dca, 996); return true; … } // Return false if you have not handled the menu item. return false; } }
15. Creating Data via REST API (DataCollectionActivity.java) public class DataCollectionActivity extends Activity { static final String TAG = "DataCollectionActivity"; … pointButton.setOnClickListener(newOnClickListener() { public void onClick(Viewv) { //Ask the user if they want to post report new AlertDialog.Builder(DataCollectionActivity.this) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle("Post Note") .setMessage("Are you sure you want to post this note?") .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Bundle bundle = new Bundle(); bundle.putString("type", pointSpinner.getSelectedItem().toString()); bundle.putString("reportdatetime", deviceData.getReportDateTime()); bundle.putString("comments", commentsEditText.getText().toString()); Intent intent = new Intent(Intent.ACTION_VIEW); intent.putExtras(bundle); intent.setClassName("com.bcs.android.sitrep", "com.bcs.android.sitrep.NoteCreateActivity"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }) .setNegativeButton("No", null) .show(); … }
16. Creating Data via REST API (NoteCreateActivity.java) public class NoteCreateActivity extends Activity { static final String TAG = "NoteCreateActivity"; private String serverUrl = "http://devweb.bcs-gis.com/arcgis/rest/services/SITREP_Notes2/FeatureServer/0/addFeatures"; … String attrString = ",'attributes':{"; attrString = attrString + "'TYPE':'" + type + "'," + "'RPTDATETIME':'" + reportdatetime + "', " + "'SUMMARY':'" + comments + "'"; attrString = attrString + "}"; String coordString = "[{'geometry':{"; coordString = coordString + "'x':" + loc.getLongitude() + ",'y':" + loc.getLatitude(); coordString = coordString + "}" + attrString + "}]"; HttpClienthttpclient = new DefaultHttpClient(); HttpPosthttppost = new HttpPost(serverUrl); try { // Add your data List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1); nameValuePairs.add(newBasicNameValuePair("features", coordString)); httppost.setEntity(newUrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request httpResponse = httpclient.execute(httppost); … }