• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Monday, 10 Feb 2014 17:14

We’d been looking for just the right keynote speaker to inspire the crowd at the Esri International DevSummit, and we’re pleased to announce that… *drum roll, please* Chris Wanstrath, the CEO and co-founder of GitHub, will be speaking to all you lovely developers this March.


Esri has been using GitHub for years, and and it’s the site so many developers choose to host and share their code, and collaborate with other developers and projects. GitHub is used by more than 5 million people and is home to more than 10 million repositories, or repos. What made GitHub a game changer and so popular is the easy collaboration – you can fork public code, change it up, and then submit a pull request back to its creator so they can easily merge the change in if they like. Esri uses GitHub to publicly share source for our ArcGIS solutions, and many other samples, projects, and products with the ArcGIS community. Esri also uses the Enterprise version of Github running on premises to share source between various development teams working on different parts of the ArcGIS platform.

Chris WanstrathChris Wanstrath is a developer’s developer (which seems perfect for the DevSummit, which is “for developers by developers”). Chris decided to drop out of college – he was coding more than going to class, after all – and began his programming career at CNET. He later ran a successful Ruby on Rails consulting company with fellow GitHub co-founder PJ Hyett, and then in 2007 they began working on GitHub as a side project. Now it’s their main project – and a very successful one at that – and Chris is the CEO. Chris is an outspoken open source advocate who’s made hundreds of contributions to open source projects, and he’s spoken at events like NASA Open Source Summit, RailsConf, Open Source Bridge and OSCON.

We’re excited to have him at the DevSummit this March!

Jim McKinney, CTO of the ArcGIS development team, said, “We’re excited to have Chris join us and speak about his experiences while building GitHub, and how GitHub continues to evolve as a great social coding site in both the open source community and within the Enterprise. Esri uses GitHub to publicly share source for our ArcGIS Solutions, and many other samples, projects, and products with the ArcGIS community. Esri also uses the Enterprise version of GitHub running on premises to share source between various development teams working on different parts of the ArcGIS platform. I think this talk will be of great interest to many of our Developers, that may have never used GitHub yet for collaborative development work.”

Author: "Kristina Weis" Tags: "App Developers, Developer"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 06 Feb 2014 20:15

Over the past few years, ArcGIS Online has become a giant hub for people to share everything “geo”.  This includes items such as maps, packages, data, services, csv files, and more recently, documents.

You might not have known that you can share code samples too.  That means if you have some Python or ArcObjects .NET code just lying around, or a new JavaScript library that you just wrote, you can upload them to the cloud and share them with the geo-world.


Apps vs Code Samples

You can upload many different types of items to the ArcGIS cloud, so it’s important to point out that “apps” are quite different from “code samples”.  Apps are generally applications such as configurable templates and solutions that you share with others. Some app items just contain URLs to apps hosted somewhere else, while others contain pre-compiled ready-to-use apps that you can download and install on your computer or device, e.g. ArcGIS for Android.

Code samples, however, are just items that you create when you upload .zip files that contain your custom code, project files and directories.

Finding Code Samples

  1. Go to the ArcGIS.com Gallery and add “type:code samples” in the search box.

  2. Now here’s the real secret! Check ON the “Show ArcGIS Desktop Content” and click the “Date” link to sort code samples with the newest on top.  Presto!

  1. Now add some keywords to refine your search.  Try these:


GeoGeek Tip: Is there an easy way to find the latest code samples that have been uploaded to ArcGIS Online? Yes! Because every custom search is just an HTTPS REST request, you can just bookmark it and refresh your browser to see the newest code samples at any time in the future.


Sharing Code Samples

  1. Log into ArcGIS Online and go to the “My Content” tab.  NOTE:  You’ll need an account to do so.

  2. Click “Add Item” and choose your .zip to upload.

    Once you get the .zip, use the “Contents” and “Language” pulldowns to specify “Code Sample” and the language the app is written in.  Go ahead and add some tags too.

Share your code: Once the item is created, use “SHARE” to share the code sample with “Everyone” in the world, or just with a Group you own.


GeoGeek Tip: Should I use ArcGIS Online or GitHub to share my code? Great question! If you are looking for a simple way to upload a .zip file and share it with your private AGO organization, and you’re not worried about version control, then ArcGIS Online might be a good way to go. However, if you want to to publicize your code, use version control and accept code contributions from the community, then GitHub is a better tool.  If you are unsure which way to go, the just add your code to ArcGIS Online and then add a link to the GitHub repository where you can manage it and accept contributions. We do this all of the time!


That’s it folks!

If you are looking for more code examples, feel free to search the samples in the SDKs or go check out our open source projects on esri.github.io.

Author: "alaframboise" Tags: "App Developers, Developer, Uncategorized..."
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 05 Feb 2014 18:58

We’re all looking forward to seeing you at the first annual Esri Developer Summit, Washington, DC next week (Wednesday, February 12th). In addition to a two-hour Plenary session in the morning, there will be a whole day’s worth of deeper dive technical sessions. And if you are doing web development using JavaScript, we have a whole track of sessions just for you:

ArcGIS API for JavaScript: Building Web Applications – 11:15am – 12:15pm

This is an introductory-level session where James Tedrick and Evan Caldwell gets you started with JavaScript and web mapping  and spins you up on the latest capabilities of the API pretty quickly.

ArcGIS API for JavaScript: Advanced Topics – 1:30-2:30pm

Have you been using the API and are ready for more? Andy Gup is ready to take you there. He will be sharing with you apps, code, and techniques in the areas of: AMD, building custom widgets, performance techniques, unit testing, working with other JavaScript libraries, and also building web apps with JavaScript that work offline using HTML5 local storage options.

ArcGIS API for JavaScript: Building Mobile Web Apps – 2:45-3:45pm

Sometimes building cross-platform web apps for smartphones and tablets is a better option than native apps for those devices. If that’s your case, then Andy Gup will take you through samples that thoroughly cover designing and building your apps so that they can be “responsive” to the various screen size, aspect, orientation, and resolution options across those devices. You’ll walk away knowing how to make apps that look good and perform well in all of those environments. Use of 3rd party libraries such as Bootstrap and jQuery Mobile will be described and discussed.

ArcGIS WebApp Builder: JavaScript Apps Made Easy – 4:00-5:00pm

In this session, Julie Powell will show how this new builder (still in beta) will help you create and configure custom web apps without writing one line of code. And for developers, it’s important to know how the builder allows you to create custom tools through its extensibility framework using HTML, CSS, and JavaScript.

Building Mapping Solutions with Esri Open Source Projects – 4:00-5:00pm

ArcGIS is strongly compatible with a wide variety of web development technologies and libraries out there. Andrew Turner will spin you up on how to create powerful apps more quickly and reliably than ever before using open source projects. He will cover technologies such as Esri-Leaflet, Terraformer, GeoServices-JS, Bootstrap-Map-JS, as well as cover how to use OAuth 2.0 in your apps to allow them to make them accessible to ArcGIS Online named users.

For more details on these and other sessions, please see the online agenda.

To sign up for a free developer subscription to ArcGIS Online, here’s where.

If you’re not registered to attend the DevSummit DC just yet, here’s a link for doing so. We hope to see you there!

Author: "Amy" Tags: "Developer, DevSummit, JavaScript"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 31 Jan 2014 17:52

This is a minor update containing a few bug fixes and performance improvements for rendering tiles on the map display. It also allows you to use the Runtime SDK side-by-side with  Geotrigger SDK for iOS in your Xcode projects.

Author: "Divesh Goyal" Tags: "Developer, ArcGIS Runtime SDK for iOS, i..."
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 28 Jan 2014 21:25

DevSummit badgeThe International DevSummit in Palm Springs is in it’s 9th year and the number of people attending has continued to increase, as has the number of people asking for us to expand the event to other locations. So in the past year we’ve added some additional DevSummits to make it easier for developers to attend and get the latest – we had the DevSummit Europe and DevSummit Middle East in late 2013, and now DevSummit Washington, DC will be February 12, 2014 (right after the Esri Federal GIS Conference).


The DevSummit DC will start with a two-hour Plenary to get everyone up to speed with Esri’s latest tools and technologies for developers, and what will be coming in the future. Then the rest of the day is packed with technical sessions from Esri developers. Here are a few of the 24 sessions on the agenda to give you an idea:

  • ArcGIS for Desktop: Creating Add-Ins with C# and Python
  • Building Real-time Web Applications Using GeoEvent Processor
  • ArcGIS API for JavaScript: Advanced Topics
  • Building Mapping Solutions with Esri Open Source Projects
  • ArcGIS Runtime SDKs: Building Offline Apps
  • Enabling High-Quality Printing in Web Applications

After all the technical sessions, the Meet the Presenters block will give you a nice opportunity network and talk with your peers and the Esri developers who presented.

We encourage all developers working with ArcGIS to attend a DevSummit if they can – for everything you’ll learn and all the people you’ll meet. We hope to see you in DC this February, or in Palm Springs in March! If you have any questions, email devsummit@esri.com or tweet us at @EsriDevSummit.

Snapshot of DevSummit DC website

Author: "Kristina Weis" Tags: "Developer, DevSummit, GeoGeek"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 27 Jan 2014 19:00

You may have heard plans for a 10.2.1 release of the ArcGIS Runtime SDKs. Well, release dates for pieces of the ArcGIS platform have shifted a bit, so the next Runtime SDK release will be version 10.2.2. This shift allows the Runtime to be released with the rest of the platform and at the same time as 10.2.2 versions of ArcGIS for Desktop, ArcGIS for Server and ArcGIS Online.

This is an exciting release for us that brings along significant capabilities you’ve been asking for:

License Changes

One of our goals with the new release is to make it easier for you to get the SDKs and start your app development! You’ll be able to download any of our Runtime SDKs from one central location and once installed can immediately start your project with no need to license your development machine. In addition, we’ve standardized the Basic and Standard deployment options across all the platforms we support.

Taking Data Offline

We all know that cell and WIFI coverage isn’t available everywhere and many of you need to develop solutions allowing your users to take their data offline and use it without connectivity. In this next release you have many offline capabilities at your disposal:

-       View and edit your data including attachments and related tables.

-       Take Esri basemaps offline

-       Sync your data with a service on premise or hosted in ArcGIS.com

-       Perform offline routing and geocoding.

Performance Improvements

You’ll see some huge performance improvements in the map, graphics layer, and feature layers. An improved display engine means graphics are rendered almost twice as fast as before and the display of basemap tiles also sees a huge improvement!

The next release will include updates for the following SDKs:

  • ArcGIS Runtime SDK for iOS
  • ArcGIS Runtime SDK for OS X
  • ArcGIS Runtime SDK for Android
  • ArcGIS Runtime SDK for Java
  • ArcGIS Runtime SDK for Qt

We’re also working on a new Runtime SDK for .NET allowing you to target several Microsoft platforms including the Desktop, Windows Store and Windows Phone. Look for the public beta in March!

Author: "Al Pascual" Tags: "App Developers, Developer, 10.2.2, ArcGI..."
Comments Send by mail Print  Save  Delicious 
Date: Friday, 24 Jan 2014 19:25

ArcGIS Android Runtime SDK offers a custom plugin for the Eclipse IDE which is integrated with the download SDK and provided as a public URL updatesite for direct integration within your Eclipse IDE environment.  We recently rolled out an updated URL for our public Eclipse updatesite offered below:

https://developers.arcgis.com/android/eclipse/updatesite

You will need to update your previously defined Available Software Site for ArcGIS Andriod to use the updated URL above.

  1. Start Eclipse and select Help > Install New Software
  2. Click Available Software Sites in the top right hand corner.
  3. Select your previously defined software site, click Edit, and update the Location text box with the following URL:
    https://developers.arcgis.com/android/eclipse/updatesite
  4. Click OK to exit the Edit Site dialog
  5. Click OK to exit the Available Software Sites dialog.

If you have not previously set up an update site in Eclipse you can follow these instructions to create one and install the plugin in Eclipse:

  1. Start Eclipse and select Help > Install New Software
  2. Click Add in the top right hand corner.
  3. Enter “ArcGIS Android SDK” for the Name in the Add Repository dialog and the following URL for the Location:
    https://developers.arcgis.com/android/eclipse/updatesite
  4. Click OK
  5. In the Available Software Dialog select the checkbox next to ArcGIS for Android and click Next
  6. The Install Details window appears with a list of tools to be downloaded.  Click Next.
  7. Read and accept the license agreement then click Next.
  8. Restart Eclipse when the installation completes.


Happy Coding!

Author: "Dan O'Neill" Tags: "App Developers, Developer, Mobile, Andro..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 23 Jan 2014 23:43

Regardless of whether you’re a hacker or a well-seasoned developer, writing JavaScript geo apps from scratch takes some serious time, skill, and effort.  Thankfully there’s a few places you can go to get a head start, like the esri.github.io site.  There you’ll find over 170 geo projects on GitHub that are ready to go.  Most of the projects use the ArcGIS APIs and services to do something “geo”, but many integrate with other technologies as well, and others are pure JavaScript solutions.  The other cool thing is that they are all on GitHub, so if there’s a feature missing, it’s easy to make a pull request or log an issue to get it added!

Here are 10 projects that should help you get your JavaScript mapping apps out the door faster.


1.     quickstart-map-js – Looking for some short JavaScript examples to do things like add points to a map, change basemaps, find places, get directions or perform spatial analyses? Well, look no further. This project illustrates how to accomplish a bunch of common mapping tasks with the ArcGIS for Javascript API and ArcGIS Online services with minimal code.  See live demos here.  If you are an iOS, Android or Phonegap developer, there are other quick starts too!

2.     map-tour-storytelling-template-js – Do you like to tell stories with maps and pictures?  Well, this repo is for you.  If you just want to take it for test-drive first, just go use the hosted templates to build the app and let ArcGIS Online host it.  If you want to make some deeper customizations, fork and clone the code to build a custom version of the template viewer.  Either way, you still get a fully responsive app that lets you sync geographic points with images of your choice. Here’s a live example and a few other storytelling templates that you might want to check out.

3.     esri-leaflet – If you like Leaflet, then you’ll love esri-leaflet!  This project provides the plumbing to consume ArcGIS Online basemaps, services and your own features services using the Leaflet JS framework.  If you are into geocoding, you should also check out the esri-leaflet-geocoder control.  To see some examples of how it works, be sure to check out the live demos.

4.     arcgis-digit-geocoder-js – Every wonder how to build a context sensitive geo search widget?  A lot of people don’t know this, but all of the source for the ArcGIS JavaScript Geocoder widget is available on GitHub.  Behind the scenes it uses the ArcGIS World Geocoding Service and it auto-displays search results as you type.  Fork and clone this repo to create custom versions of the geosearch tool.

5.     bootstrap-map-js – Looking for a fast way to build a nice looking, responsive website with a map?  Well look no further.  This project shows you how to use the new Bootstrap 3.0 framework to build a killer website with a fully responsive map.  Just add two files (bootstrapmap.js and a bootstrapmap.css) and your maps will magically recenter, resize and realign and work in the the Bootstrap components.  The map pop-ups are also uber-responsive too.  Check out the live demos here.  If you are using Bootstrap 2.x and you want to stick with just Dojo, you might want to check this out.

6.     terraformer – Need to convert GeoJSON or WKT to ArcGIS JSON or vice versa, do some light-weight geo-spatial operations (e.g. point in polygon), or build a custom NodeJS data store?   Well look no further, terraformer is here to save the day. Save yourself some time by integrating this geo-library into your client-side JavaScript apps or in your NodeJS apps.  Be sure to check out this super cool website with all the library doc and you’ll find a few live samples here.

7.     ago-assistant – So many people don’t know about this little gem.  Do you have an ArcGIS Online account and you need to transfer maps, feature services or other items to another account?  Well no longer do you have to export and re-import each item.  Use this tool to copy items between any two ArcGIS Online accounts.  As a bonus it also works for Portal for ArcGIS.  Missing a feature?  Go ahead and make a pull request to get it in.  Take it for a test drive here.

8.     sencha-touch-map-checkin-js – Want to build a Foursquare-like checkin app on GIS steroids?  This project illustrates how to use Sencha Touch, the ArcGIS for JavaScript API and ArcGIS Online to get it done.  ArcGIS Online feature and network services let users find pizza joints within 3, 5, and 10 minutes away and then navigate their way to stores.  All check-ins/check-outs are stored so that pizza store managers can analyze the data at a later date.  Here’s the live app.

9.     koop – Need some help getting your GeoJSON services into ArcGIS apps?  This provider makes it super easy to build a NodeJS app to access your own services and expose them as ArcGIS REST Feature Services so that they can be accessed by other ArcGIS apps and APIs.  Most of the plumbing is done for you so it makes it really easy to implement with your own services.  The repo has a few examples that illustrate how to expose Feature Services from GISTs, GitHub, AGO and Socrata.  Pretty neat!

10. citizen-service-request – Looking to build an HTML 5 crowd-sourcing application for citizens and government workers?  If so, be sure to check out this JavaScript app that provides an out-of-the-box solution for just such a task.  It allows citizens to submit, comment and share requests on social media, and it gives government the ability to review them.  Give it a try here.  If you are interested in other government apps and templates, be sure to check them out here.

 Visit esri.github.io to search for more open source geo projects.

Author: "alaframboise" Tags: "App Developers, Apps, ArcGIS Online, Dev..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 23 Jan 2014 19:30

Everyone knows that consumer devices are now in the hands of everyone from toddlers to your grandparents, and your information when designed for mobile, can reach more individuals than ever before. You may know that you need a mobile strategy, but you might not be sure which strategy (web, hybrid, or native) to pursue.

This post is intended to help you choose between web, hybrid, and native strategies when targeting Android, iOS, and Windows Phone consumer mobile devices. This post doesn’t cover solutions that target ruggedized hardware (laptops or non-consumer devices). For information on using ruggedized hardware with Windows Mobile, see Esri’s Windows Mobile home page.  In a future post we will look into mobile workflow scenarios for targeting Android, iOS, and Windows Phone.

A few key comparison points

The most important goal is to deliver the best experience and functionality for the audience of your mobile application. Below are questions to ask yourself to help you achieve this.

  • How widespread of a mobile audience must you reach?
  • Do you know what regions of the world you are trying to target?  Do you know what devices they’ll have?
  • Who is the target audience (internal app or consumer public) and what functionality (mapping, advanced analysis, and so on) is required to support the application?
  • Are your users sometimes disconnected and need the app to run offline?
  • What skill set does your current development team possess?
  • What data and web services are required to support the application?
  • Who is the steward of the data behind the web services?  Do you have access to the data if necessary (for example, ability to create offline data sources)?
  • Are there requirements for device integration, such as use of the device’s GPS, compass, media, calendar, contacts, text messaging (SMS), notifications, etc?

Strategies summarized

  • Native — The native strategy offers the best device integration and the most out-of-the-box functionality for offline workflows, but it requires native development skill sets. You can use Esri’s Runtime SDKs (Android, iOS, and Windows Phone) to create native apps.
  • Hybrid — Hybrid strategies use a mixture of native components and web app content (HTML, JavaScript and CSS) to build native applications and there are many different ways that this can be achieved. The simplest approach is to embed a web control into a native app and load web content, more advanced approaches include using frameworks (for example, PhoneGap or Appcelerator Titanium) which allow richer integration with the native platform.  You can use Esri’s JavaScript API and Esri’s Runtime SDKs in hybrid strategies. The Wikipedia topic on hybrids might help you better understand hybrid strategies. These articles may also help provide context: Inside Facebook’s mobile strategy by Kurt Wagner, Mashable, and Mobile: Native Apps, Web Apps, and Hybrid Apps, by Raluca Budiu of Nielsen Norman Group.
  • Web — A web strategy is where HTML, JavaScript, and CSS is hosted on a web server and delivered to the user’s device using its mobile web browser. This strategy is best if you don’t know which devices your users will have and you need to reach a wide audience. You can use Esri’s JavaScript API in a web strategy.

The table below provides a detailed look at these and additional comparison points.

A closer look at mobile strategy differences (generic)

Consideration Web strategy Hybrid strategy Native strategy Notes
Understanding your users and which devices they prefer Target the device’s browser (a single hosted web app used by all) Target each specific device OS, but leverage existing web content and native APIs (an app for each device OS) Target each specific device OS, and deliver the best native experience (an app for each device OS) Device popularity varies geographically (North America, Europe, Asia)
What skill sets do your developers have? Requires HTML, JavaScript, and CSS Requires HTML, JavaScript, and CSS, and knowledge about compiling the hybrid framework Requires skills developing on each native platform (for example, Objective-C for iOS, Java for Android, and .NET for Windows Phone)
Do you want to distribute the app through a store (App Store and/or Google Play)? Distribution through a store is not supported Distribution through a store is supported Distribution through a store is supported
Access to device utilities Limited to HTML5 mobile features Limited based on the development approach, and frameworks used Access to all device utilities (GPS, compass, calendar, media, contacts, camera, and so on)  Some hybrid strategies (frameworks) provide wrapper calls to underlying native API technology
Maintenance on multiple devices When you update your app, it is immediately available to all devices When you update your app, you must update it for each device type When you update your app, you must update it for each device type

A closer look at mobile strategy differences (ArcGIS)

Consideration Web strategy Hybrid strategy Native strategy Notes
Will users need to use the app and data offline? Some local storage is possible with HTML5, offline GIS also possible but involved** Offline app use is possible through the hybrid framework’s local storage mechanism. Offline GIS also possible but involved** Offline app use is built into the native platforms.  Offline GIS possible allowing for offline map viewing, editing with sync, geocoding, routing, and analysis*** Hybrid offline workflows using PhoneGap or Titanium are not straightforward and simple as compared to building native apps
Routing and geocoding Online only* Online only* Online and offline are supported*** Requires ArcGIS Desktop to author offline data sources
GeoEnrichment Online only* Online only* Online only** GeoEnrichment lets you add a variety of demographic and landscape variables
Analysis (geometry operations) Online only* Online only* Supported online** and offline through local analysis*** Operations such as clip, buffer, and intersect. Editing workflows such as simplify, densify, union, merge, split, and so on
Model-based analysis (geoprocessing) Online only* Online only* Supported online***, offline also available on Windows and Linux*** Build models in ArcGIS Desktop, then provide mobile clients analysis through geoprocessing services
Geometric network tracing Online only* Online only* Supported online***, offline also available on Windows and Linux*** Supported through model-based analysis (geoprocessing service)  Example: valve isolation trace.
Advanced cartography and symbology Online only* Online only* Supported online and offline*** Includes support for rotation, offset, geodesic symbols, and military symbology, such as 2525C and APP-6B
Display/animate large numbers of features Not recommended Not recommended Once you have the features, you can animate their graphics and maintain smooth/fast map navigation*** A native app can support millions of features. For web and hybrid, the number of features you can have before performance degrades depends on several factors, such as the browser, but generally 10,000 – 100,000 is the maximum
Local file based data (shapefiles and imagery) offline Not available Not available Offline and local access to shapefiles and imagery is built into the native platforms.*** Planned for this summer

*   Using ArcGIS API for JavaScript out of the box API components
**  Using ArcGIS REST API and developer has to send requests and process responses
*** Using ArcGIS Runtime SDKs out of the box API components

 ArcGIS Platform

No matter which strategy (web, hybrid, or native) you choose, the power of the ArcGIS Platform is what drives the web services used by the Esri APIs mentioned. ArcGIS API for JavaScript and the ArcGIS Runtime SDKs deliver advanced mapping and visualization, web based editing, powerful analysis capabilities, location analytics, geocoding, directions and routing, and geoenrichment (via demographic and landscape variables).  Developers can also extend the ArcGIS Platform by writing custom web services through developer server object extensions to perform custom business logic and advertise that functionality to mobile client applications.  For more information visit the Esri developer’s site and the ArcGIS REST API documentation.

The software development patterns are very similar at a high level regardless of which API you choose. As you can see there are many decisions involved when choosing your mobile strategy.  Hopefully this information will make the process more straightforward and save you time when making decisions about your next mobile application.

Author: "Lloyd Heberlie" Tags: "App Developers, Developer, Mobile, Web, ..."
Comments Send by mail Print  Save  Delicious 
Date: Friday, 17 Jan 2014 19:45

Las Vegas is obviously no stranger to gambling, but the first weekend in January more than usual flocked for a proverbial roll of the dice.

At the 2014 AT&T Developer Summit Hackathon, we watched over 600 cutting edge developers descend on the Palms Hotel and leverage location in their apps alongside smart watches, beacons, headsets, intelligent fabric and more. As always in Las Vegas, the stakes were high!


Saturday – lets get hacking
The Hackathon had two tracks to guide project scope, one focusing on ‘wearables’ (technology you carry with you) and another for apps built around AT&T’s own APIs. With $40,000 prize pools for each track, the atmosphere was electric! To kick things off Justin Colville gave a brief explanation of Esri’s offerings. The crowd listened intently to the other sponsors as they explained the terms of the various Accelerator prizes.


After the competition was underway, coders on 109 different teams took over the Rain nightclub to develop smartphone and web applications that utilized Arduinos, Pebbles, Gimbals, Plantronic Headsets and Esri location tools that developers can work with for free at: http://developers.arcgis.com.
We had staff present late into the evening to discuss implementation details and at 3am there were more faces glowing behind laptops than there were in front of slot machines.


Sunday – Last minute changes, presentations, and awards!
Sunday morning it was time to put the finishing touches on the code and start working on pitching the project in a blisteringly short 90 seconds. Our hats went off to all the teams for working under such difficult conditions. Project deadlines are even tougher in a town with no clocks!


Best Overall App
We were proud (but not surprised) to see that the best use of Esri technology was also awarded the overall Grand Prize for AT&T’s API Challenge! Cathy Han, Sarah Hum, Andrew Rasmussen, Nick Porter, and Wayne Spiegel put together an absolutely awesome smartphone app (called ‘M’) which helps you get connected with someone nearby if you’re in need of cash after making a quick deposit to their bank account through the app. This was accomplished by spinning up an ArcGIS Online hosted feature service and making RESTful calls to update user locations using node.js.


Other notable apps
We saw 17 other great apps that incorporated Esri technology; including a smart dog collar that sounds an alarm when your pup leaves the yard, web applications that conduct a personalized search for nearby events and activities, and a dashboard for people interested in improving their health complete with a map of nearby farmers markets and other amenities.



When the caffeine finally wore off it took a few days to recuperate, but we had an amazing time participating in the festivities and were inspired by the new and exciting places the developers took our tools.

pictures copyright AT&T‘M’ app animation courtesy of Nick Furness

Author: "john gravois" Tags: "App Developers, Developer, ArcGIS Online..."
Comments Send by mail Print  Save  Delicious 
Date: Monday, 13 Jan 2014 21:53

HackathonWe would like to thank all of the devs, designers and geo enthusiasts who came out this weekend to participate in the first ever Esri MapCamp in Portland.  This was a jam-packed weekend of geo presentations, data sharing, API exploration, learning, collaborating, hacking and making friends. See all the photos here.

The mission was simple: Solve the biggest problem you can think of for downtown Portland…  and learn, collaborate and make as many friends as possible along the way!


Friday – The Gathering

Friday night everyone gathered at ISITE Design, and Gene Ehrbar, Amber Case and Allan Laframboise kicked things off with a few presentations.  By the end of night, teams formed and everyone was ready for action.

Saturday – Learning, Collaborating, Hacking 

Saturday started with even more presentations from Esri, MapBox, and CivicApps, and then the teams started to hack.  We also set up an ArcGIS Online (MapCamp) Group and stocked it full of data and maps. Attendees were given access to the organization, datasets and as many service credits as they needed to undertake spatial analyses. A number of other datasets were also available from CivicApps and the City of Portland. Another interesting dataset was the Car2Go csv collection that Aaron Parecki put together (and demoed) that included tones of csv point data of car locations over time.

Sunday – Everyone’s a Winner!

After three days of presentations, learning, sharing, brainstorming, collaboration and serious hacking, here are the winning teams and apps. The best news is that every team that entered walked away with something!  Here were the three judges: Allan Laframboise, Gene Ehrbar and Justin Miller.

Best Overall App 

Hook it to my veins – A hip web-mobile coffee finder app built with Esri Basemaps, Leaflet and Angular JS. No longer are the best coffee places in town a secret! Kudos to the winning team: Travis Cline, Phil Willis, Alex Mueller, Peter Nguyen and Ryan Callihan.

Esri Award

ReadID Exhibitor ShowTime Analysis - A tool to allow the public to find out which theaters are playing 2D and 3D movies around them. It also allowed business owners to undertake drive-time, demographic and social-economic analyses to discover more information about their customers. The team behind ReadID was Joey Baloun, Steve Winstead, Aaron Paul, Thien Le and Tuan Le.

MapBox Award

Heritage Trees - A PhoneGap app to allow you to find (and support) historical trees around you in the Portland area. This app was built by Julie Steele, Dona, Jeff Mishima, Thang Tran and Edwin Knuth.

Runner-up

OSM Buildings – A set of scripts and a process for importing a large amount of 3D building footprint data into OSM for the Portland area. This team was Rafa Gutierrez, TC Haddad, Mele Sax-Barnett, Darrell Fuhrman, John Heasly, Daniel Ford and Brylie Oxley.

Huge thanks to Gene Ehrbar, Alex Mueller, Sarah Taylor and ISITE Design for helping host the event, Justin Miller from MapBox, Michael Gray and Skip Rotter from GlobeSherpa and all of the other presenters for participating too.

If you’ve never been to an event like this before, you should check them out. They are fun, casual, collaborative events but jam-packed with information and presentations of geo technology, APIs and other cool mapping stuff. Some people showed up with existing projects, others came out to meet other geo people, and others came out to just learn about the latest and greatest mapping technologies. For other really cool geo events, you should check out our GeoDev Meetups in your area.

Author: "alaframboise" Tags: "App Developers, Developer, ArcGIS Online..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 02 Jan 2014 23:55

Version 3.8 of the ArcGIS API for JavaScript is now available! Below is a complete listing of new features, enhancements and bug fixes included in this release. The same information is available in the What’s New in 3.8 page in the SDK.

Better support for new renderer types throughout the API

The new renderers (dot density and proportional) introduced with version 3.7 of the API now work with the legend widget and can be printed. To demonstrate, a legend was added to the dot density renderer sample and a feature layer with a proportional symbol renderer was added to the print widget sample.

New esri/geometry/Circle module to easily create circles

Create a circle by supplying a center and radius. This module also lets you specify if you want a geodesic circle. Geometries created are polygons, and, as such, calling toJson returns a Polygon. Refer to the new Create circles sample for an example of how to use this module.

Popup changes

In the image above, pre-3.8 is shown on the left and the new style is shown on the right. The popup now uses a small beak in all locations whereas it previously used a longer callout when the popup was anchored to a location close to a corner of the screen.

The popup has two new properties: visibleWhenEmpty and hideDelay. These control the behavior of the popup when no features are found at the popup’s current location (doing a query against a dynamic map service, for instance). In those cases, if visibleWhenEmpty is true, the popup will be hidden after the number of milliseconds specified by hideDelay have passed.

Enhancements to better support graphics that use text symbols

The graphic editing tools included with the API now support editing, scaling and rotating text symbols used to symbolize point graphics. The editing tools sample has been updated to include a point with a text symbol to demonstate this. Click text on the map to move, scale or rotate it. To edit the text itself, double-click.

The printing components included with the API have also been updated to better support printing of graphics that use text symbols.

New samples

Enhancements and bug fixes

  • Dot-density renderers sometimes look fuzzy
  • Improve layer swipe widget performance when swiping several layers
  • Measurement widget: include nautical miles
  • Support for IE11

Dojo

Version 3.8 of the ArcGIS API for JavaScript uses Dojo 1.9.1 as well as version 0.3.11 of dgrid, 0.3.5 of put-selector and 0.1.3 of xstyle.

Author: "Derek Swingley" Tags: "App Developers, Developer, ArcGIS API fo..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 19 Dec 2013 01:29

With the ArcGIS Android v10.2 release we introduced a bunch of offline developer capabilities as beta features in the API.  One of the more important features is the ability to create your own ArcGIS Runtime Geodatabase programmatically for use with offline features.  In this post we will step through the programmatic workflow for creating these offline geodatabases.

Offline Patterns

There are two patterns for creating a Runtime Geodatabase offered below:

  1. Service pattern:  Best for supporting a large number of users as the data is exposed as a service which supports downloading parts or all of the features as a Runtime Geodatabase.
  2. Desktop pattern:  Coming with the 10.2.1 Desktop release you will be able to create a Runtime Geodatabase from ArcGIS for Desktop.  This content can include features, tabular data, tile caches, and network datasets.  This pattern is best for supporting applications with read-only data that require periodic updates.

Generate a Runtime Geodatabase from a feature service

We will use the services pattern when creating a Runtime Geodatabase with the ArcGIS Android API.  The service is exposed as a REST endpoint which we can use in the GeodatabaseTask constructor which manages offline usage of ArcGIS Services.  The overloaded GeodatabaseTask constructor which takes a CallbackListener allows the API to manage the background tasks involved with generating the geodatabase and downloading it to your device for offline usage.  Below I offer code which creates the GeodatabaseTask from an unsecured feature service URL and create a new CallbackListener which returns a Future to allow you to check on status and/or cancel a request.

/**
 * Create the GeodatabaseTask from the feature service URL w/o credentials.
 */
private void downloadData(String url) {
	Log.i(TAG, "Create GeoDatabase");
	// create a dialog to update user on progress
	dialog = ProgressDialog.show(mMapView.getContext(), "Download Data",
			"Create local runtime geodatabase");
	dialog.show();
	// create the GeodatabaseTask
	gdbTask = new GeodatabaseTask(url, null,
			new CallbackListener() {
				// Handle errors
				public void onError(Throwable e) {
					Log.e(TAG, "Error occured creating Geodatabase Task");
					dialog.dismiss();
				}

				// Handle success
				public void onCallback(FeatureServiceInfo objs) {
					// create the geodatabase
					createGeodatabase();
				}
			});

}

The downloadData method we stubbed out takes in a String representing the feature service URL.  After showing a dialog to the user we create the GeodatabaseTask object and CallbackListener.  The CallbackListener has the following two methods to implement:

  1. onError:  This method handles a failed result.  Currently we log the failure and dismiss the dialog.  You may want to do something more useful here to inform your users that there was an error in attempting to create the GeodatabaseTask object.
  2. onCallback: This method handles a successful result.

In our method stub we call a createGeodatabase method if the result is successful.  This method does all the prep work for submitting the request to create our offline Runtime Geodatabase and from these parameters submits the request.

/**
 * Set up parameters to pass the the submitTask() method. A
 * CallbackListener is used for the response.
 */
private static void createGeodatabase() {
	// set up the parameters to generate a geodatabase
	GenerateGeodatabaseParameters params = new GenerateGeodatabaseParameters(
			layerIds, mMapView.getExtent(), mMapView.getSpatialReference(),
			returnAttachments, syncModel, mMapView.getSpatialReference());

	// a callback which fires when the task has completed or failed.
	CallbackListener gdbResponseCallback = new CallbackListener() {
		public void onCallback(final Geodatabase gdb) {
			Log.i(TAG, "Geodatabase is: " + gdb.getPath());
			dialog.dismiss();
			// update map with local feature layer from geodatabase
			updateFeatureLayer(gdb.getPath());
		}
		public void onError(Throwable e) {
			Log.e(TAG, "Error creating geodatabase");
			dialog.dismiss();
		}
	};

	// a callback which updates when the status of the task changes
	GeodatabaseStatusCallback statusCallback = new GeodatabaseStatusCallback() {
		public void statusUpdated(GeodatabaseStatusInfo status) {
			Log.i(TAG, status.getStatus().toString());
		}
	};

	// create the fully qualified path for geodatabase file
	localGdbFilePath = createGeodatabaseFilePath();

	// get geodatabase based on params
	submitTask(params, localGdbFilePath, statusCallback, gdbResponseCallback);
}

First we set up the parameters to generate the geodatabase.  Parameters are supplied to the GeodatabaseTask when generating a Runtime Geodatabase which allow you to define some or all of the following:

  • Layers defined in the geodatabase
  • Extent of the generated geodatabase
  • Spatial reference of the geodatabase
  • Inclusion of attachments
  • Synchronization models
  • Layer queries by filter or attributes

You set up these parameters with the GenerateGeodatabaseParameters class and it’s varying overloaded constructors.  We use the constructor to set the parameters and then create a CallbackListener in a similar pattern to when we created our GeodatabaseTask object to deal with the success or failure of generating our geodatabase.  Additionally, we set up a GeodatabaseStatusCallback to check the status of the generation process. We implement the statusUpdated method which gets called when the geodatabase task has been updated.  Valid update status can be found in the GeodatabaseStatusInfo.Status Enum.  After creating a geodatabase file name and path we pass that as one of the parameters with the geodatabase params we set up at the top of the method and the callback listeners we defined to handle results and check status to the submitTask method which does the generation and download of our Runtime Geodatabase.

/**
 * Request database, poll server to get status, and download the file
 */
private static void submitTask(GenerateGeodatabaseParameters params,
		String file, GeodatabaseStatusCallback statusCallback,
		CallbackListener gdbResponseCallback) {
	// submit task
	gdbTask.submitGenerateGeodatabaseJobAndDownload(params, file,
			statusCallback, gdbResponseCallback);
}

The GeodatabaseTask.submitGenerateGeodatabaseJobAndDownload() method does the heavy work for us on a background thread.  This method requests the geodatabase, polls the server to get the current status, and downloads the geodatabase file to the location you specify on your device when it is ready.

Import the Create Runtime Geodatabase Android SDK sample into eclipse using the New Sample wizard provided by the plugin or download the sample here to use in another developer IDE.  Remember that all the classes and interfaces I exposed in this post are in BETA format.  That means you still have time to work through the API and provide feedback through our forums.  Please do not hesitate to provide feedback as user experience with our API can be the most valuable feedback we get.
Happy Coding!

Author: "Dan O'Neill" Tags: "App Developers, Developer, Mobile, Andro..."
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 17 Dec 2013 18:24

Version 3.6 of both the ArcGIS API for Flex and ArcGIS Viewer for Flex was released on Tuesday December 17th, 2013.  This release was focused on key user enhancement requests and bug fixes for both the Viewer and API.

API Enhancements

For a complete list of API enhancements, see the What’s new in ArcGIS API for Flex topic on the developer’s site.  Below are snapshots of some enhancements.

Simplified use of AttributeInspector to display attributes of a graphic

User enhancement request to enable linking of attributes within AttributeInspector

Application Builder and Viewer Enhancements

For a complete list of Application Builder and Viewer enhancements, see the What’s new in ArcGIS Viewer for Flex topic on the Resource Center.  Improvements were made to the core Application Builder and Viewer, and many of the widgets.

Query and Search widgets now have support for line symbology on polygon features.  Search widget now supports setting symbology per layer’s results.

Author: "Lloyd Heberlie" Tags: "Developer, Web, ArcGIS API for Flex, Arc..."
Comments Send by mail Print  Save  Delicious 
Date: Friday, 13 Dec 2013 13:00

Maybe you’ve heard, there’s a new extension for ArcGIS for Server Standard and Advanced available at ArcGIS 10.2. It’s called ArcGIS GeoEvent Processor for Server and it expands the capabilities of ArcGIS allowing you to incorporate real-time data into your decision-support GIS applications.

GeoEvent Processor provides connectors for common sensors and streaming data sources including in-vehicle GPS devices, mobile devices, and social media providers. You can efficiently detect and focus on the most interesting events, locations, and thresholds in your operations by applying real-time filters, processing, and analytic capabilities. You’re able to monitor your most valuable features on land, sea, and in the air and have key personnel automatically alerted immediately when conditions meet specified criteria.

GeoEvent Processor Connectors

GeoEvent Processor provides a number of Input Connectors and Output Connectors out-of-the-box with additional connectors available on the ArcGIS GeoEvent Processor Gallery, Partner Gallery, and User Community Gallery. The connectors available on the galleries allow you to enable GeoEvent Processor to handle additional types of sensors or feeds. Many connectors have their associated source code available on Esri’s GitHub. With access to the source code for these select connectors, you can easily modify them to meet your specific requirements using the GeoEvent Processor Software Development Kit (SDK). Plus, if you cannot find a connector for the real-time data you want to integrate, you can create a completely new connector using the GeoEvent Processor SDK.

Common GeoEvent Processor Use Cases

Configuring a common operating picture of what is happening in the field: Display in a map the live location and status of your assets in the field including vehicles, personnel, environmental sensors, etc. For example:

  • A police department may want a real-time picture (a map) of where all the police patrols are and their current status: in-service, out-of-service, busy, available, etc.
  • A utility company may want to visually represent the status of their network with real-time information captured by sensors in the field and map the location of field crews with their current status.
  • An organization can publish a map that accurately shows the last known pollution levels or weather across their region or the country.

Make more informed decisions and respond faster: GeoEvent Processor allows you to not only to display real-time data, but to process and analyze it in real-time. Additionally, GeoEvent Processor allows you to notify people of relevant events, as they happen. For example:

  • A transportation company can monitor the temperature of goods within delivery trucks and warn the driver and the supplier via SMS or email when a particular temperature threshold is crossed. End customers can also be notified when the delivery truck is 15 minutes from the delivery location.
  • Crews at a construction company can be alerted when expensive equipment leaves a project area.
  • Emergency responders can use the current location of field crews to determine which one is closer to a particular incident.
  • A logistics company can lock down access to a computer or vehicle when its owner is more than 60 feet away from the vehicle.
  • A snowplow company can keep track of the route followed by its vehicles during a storm. The tracked route can be logged for further analysis, indicating if a particular vehicle stopped for a long period of time or deviated from its initial assignment.

GeoEvent Processor Resources

From the Real-time Data Feed and Sensors page on the ArcGIS for Professionals site, you have access to a wealth of information related to GeoEvent Processor, all from one location!

The GeoEvent Processor Team looks forward to hearing your feedback!

Author: "GeoEvent Processor Team" Tags: "Developer, Services, Uncategorized, ArcG..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 12 Dec 2013 00:27

And now we bring to you our Semi-Annual Forum MVP Winners. Twice per year we award MVP prizes to those users who contribute the most to our forums, based on the points they earn as you vote on their posts throughout the year. What better way to thank those who help to grow our community through our forums, which are our most popular community tools? They encourage discussion, discovery, sharing, and assisting others to enhance their experience with ArcGIS. The forums continue to grow as new ones are created with our developed products. So here is our thank you in recognizing those who help us to be who we are: you, our users!

We have some new MVP badges in our list!* Welcome! You’re in with good company! Be sure to welcome them to the club. Once an MVP, always an MVP. We also give them additional tools like the ability to move a thread from one forum to the other in order to give your questions a better chance of being answered. They can also mark an answer as being the best one by clicking the green check mark. See more about the MVP Program here.

Not only are the MVPs badged so you can find them, but they’re also eligible for prizes like software, books, training courses, and conference seats as a collective ‘thank you’ from us for all of their great effort. Here we have our top ten Semi-Annual MVP Forums users who are being awarded from May 2013 – October 2013:

Robert Scheitlin            rscheitlin

Richard Fairhurst         rfairhur24

Tim Witt*                      timw1984

Ken Buja                       kenbuja

Anthony Giles               ad_giles@hotmail.com

Jason Zou*                    zj_zou

Marco Boeringa*          mboaringa2010

Curtis Price                   curtvprice

Wayne Whitley            Wayne_Whitley

Again, thank you so much to all of you who help us to support our Esri community through the ArcGIS Forums!

Author: "Amy" Tags: "Developer, forums, MVP"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 26 Nov 2013 02:07

The Android emulator is a key tool for Android developers and with Android 4.0.3 r2 it started support for OpenGL ES 2.0.  This allowed applications built with ArcGIS Android to run inside the emulator.

Virtual Machine Acceleration
We are excited to provide x86 native libs with our 10.2 release to support running an emulator inside an accelerated virtual machine.  The Android emulator allows for taking advantage of a CPU extension for running virtual machines (VM’s).  In order to take advantage of this feature you must make use of x86 system image target emulator and some additional configuration to your development system platform. To use virtual machine acceleration with the emulator you need the Android SDK tools, Revision 17 or higher and the Android x86 based AVD configuration.

Additional configuration is required on your development system platform. For Windows and Mac development systems start the Android SDK Manager and select Extras > Intel Hardware Accelerated Execution Manager:

Then run the IntelHAXM installation:
Windows:

[sdk]/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe

Mac:

[sdk]/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg

Once install is complete you can verify the your configuration by executing the following command from a terminal window:
Windows:

sc query intelhaxm

Mac:

kextstat | grep intel

Please refer to  the Android guide to read more about virtual machine acceleration.

Create an Android Emulator with Hardware Acceleration
Graphics acceleration was introduced in Android SDK Tools revision 17 and Android SDK platform API 15 revision 3.  Use the Android SDK Manager to ensure you have these components installed.  Graphics acceleration for the emulator takes advantage of the graphics processing unit (GPU) of your computer for faster screen drawing.

  1. Open the Android Virtual Device Manager.
  2. Click the New button.
  3. Type in a name for your emulator in the text box next to AVD Name.
  4. Select a device from the Device drop down.
  5. Choose a Target, must be Android 4.0.3 or higher, from the drop down box.  Choose Android 4.2.x or higher to take advantage of VM acceleration.
  6. Choose a CPU, e.g ARM or x86.
  7. Under Emulation Options, check the Use Host GPU checkbox.
  8. Click OK to create the emulator.

Refer to the Android guide to read more about hardware acceleration. Happy coding!

Author: "Dan O'Neill" Tags: "App Developers, Developer, Mobile, Andro..."
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 20 Nov 2013 02:30

Today we launch the public beta version of Esri’s Geotrigger™ Service so developers can add location awareness and location-based alerts to apps for iPhone and Android. There’s so much excitement around this particular service—of the many we provide to developers (think geocoding, routing, geoenrichment, and of course maps).

Snapshot of Geotrigger Editor

How does the Geotrigger Service work? An invisible area drawn on a map is set to have an action or message associated with it. When your mobile device crosses into the “trigger zone” the Geotrigger Service sends a location-based message to that device, or even notifies your server for custom events.

Here’s what you need to know:

  1. The Geotrigger Service runs in the cloud. That means all you have to do is add the Geotrigger SDK to your application, set up push notifications, and associate your client ID with the service. Finally, define your geofences, push notifications into the service, and begin testing your location-aware apps.
  2. The Geotrigger Service provides a new level of functionality for your apps! Now your apps can easily send messages to users when they arrive at or leave areas you define with a geofence. And, quickly gather business intelligence such as where people are and what time it is when the app is used.
  3. Stop worrying about battery drain. Have you used a location-based app and watched your battery drain? Our service reduces battery drain when running location-based apps.
  4. Free while in beta. ArcGIS Online subscribers are invited to try the Geotrigger Service API and its iPhone and Android SDKs for free until its final release in early 2014. We’ll use your feedback to shape the future of the service.
  5. The sky is the limit. We cannot think of any industry that would not benefit from an app built using the Geotrigger Service. Here’s some examples:

Retail and Loyalty: Engage customers with personalized content and deals the moment they enter a store.

Real Estate: Send messages to prospective home buyers when their search criterion matches a home nearby.

Energy Management: Use your location to automatically manage power consumption in your home or office.

Tourism: Bring public attractions to life by informing tourists of interesting locations as they explore your city.

Public Alerts: Notify citizens about events such as road closures or civic emergencies based on past locations.

Ready to build your next app with the Geotrigger Service? Check out https://developers.arcgis.com/en/geotrigger-service/

Author: "Kristina Weis" Tags: "App Developers, Developer, Mobile"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 15 Nov 2013 18:57

In part 1 of our Simplified API programming pattern for ArcGIS Android we discussed how the MapOptions class can define a basemap, zoom level, and center of a MapView to simplify the programmatic workflow in setting up your map.  In this post we will discuss using the ArcGIS Android Application Framework to further simplify programmatic workflows related to adding geometries with callouts and reverse geocoding.

Working with the ArcGIS Android Application Framework

The application framework for ArcGIS Android provides simplification classes to assist in supporting some Mapping and Locator workflows.  The easiest way to integrate the framework is with the Eclipse plugin:

  1. Right click your ArcGIS for Android project and choose ArcGIS Tools > Add Application Framework to Project. This option is only available on ArcGIS for Android projects.

This will add the arcgis-android-app-framework.jar file to your project and you can begin taking advantage of the helper classes it provides.  If you are not using Eclipse you can get the arcgis-android-app-framework.jar file from your SDK on disk in the <arcgis-install-dir>/libs/ directory which you can add to your project.

MapViewHelper

The MapViewHelper class provided by the ArcGIS Andriod Application Framework provides a simplified pattern for adding geometries, callouts, and popups to a MapView.  We are going to focus on adding a geometry and working with the callout on the resulting graphic.  Using the MapViewHelper class allows you to add simple geometries intuitively to the MapView without dealing with GraphicsLayer, Spatial References, etc.

A simplified pattern of adding a point to a GraphicsLayer with an custom icon symbol for the graphic and a title and text for the Callout is defined below:

// Retrieve the map and map options from XML layout 
// Using MapOptions 
mMapView = (MapView) findViewById(R.id.map); 
// Create a MapView Helper 
mvHelper = new MapViewHelper(mMapView); 
// Create drawable icon 
icon = getResources().getDrawable(R.drawable.route_destination);
// Make sure map has loaded before adding geometries 
mMapView.setOnStatusChangedListener(new OnStatusChangedListener() { 
  private static final long serialVersionUID = 1L; 
  public void onStatusChanged(Object source, STATUS status) { 
    // Add a graphic to represent ESRI Headquarters 
    int loaded = mvHelper.addMarkerGraphic(34.056695, -117.195693, 
                 "ESRI", "World Headquarters", null, icon, false, 0); 
    if (loaded < 0) { 
      Log.d("TAG", "Marker Graphic not added to MapView"); 
    } 
  } 
});

The code above will place a custom icon for the graphic at the provided latitude and longitude provided. When the graphic is tapped it will show a callout with the title and snippet provided. The returned int is a unique id representing the added Graphic. It will return -1 if the graphic failed to be added to the MapView.

GeocodeHelper

The GeocodeHelper class provides static methods to generate candidates for an address or find an address for a given location. These methods simplify the workflow of setting parameters and getting result from a Locator. The operation can be cancelled through Future. When an operation is cancelled, the the callback won’t be invoked. However, the request to the operation may be sent before the operation is cancelled.

		
// initialize online locator
locator = Locator.createOnlineLocator();
// array of fields to be shown in the callout
final String[] fields = { "Address", "City", "Region", "Postal" };

// single tap on map to get the address of the location tapped
mMapView.setOnSingleTapListener(new OnSingleTapListener() {
  private static final long serialVersionUID = 1L;

  public void onSingleTap(float x, float y) {
    // remove all previous graphics
    mvHelper.removeAllGraphics();
    // show address using screen coords
    Future result = GeocodeHelper.showAddress(x, y, locator, mvHelper, null, fields,
			new CallbackListener() {
                          // handle any errors returned
                          public void onError(Throwable e) {
                            Toast.makeText(SimpleMapActivity.this, "Error",
                                 Toast.LENGTH_LONG).show();
                           }
                           // handle successful results
                          public void onCallback(LocatorReverseGeocodeResult objs) {
                            Log.d("TAG", "Reverse Geocode success!");
                           }
                         });
    }
});

In the code above we are able to single tap on the map and get returned an icon representing the location where we tapped.  When you tap on the icon you get a CallOut with the address fields we sent in as a parameter.

Please refer to the SimpleMap sample to see the full programmatic pattern in use by an app.  You can use the New Sample Wizard in your Android SDK 10.2 Eclipse plugin to import the project.

Author: "Dan O'Neill" Tags: "App Developers, Developer, Mobile, Andro..."
Comments Send by mail Print  Save  Delicious 
Date: Friday, 08 Nov 2013 00:58

A new programming pattern we introduced at 10.2 to simplify creating MapViews pre-defined with basemaps, zoom levels, and center at by latitude and longitude values.  When working with ArcGISTiledMapServiceLayer in previous releases you would have to call specific methods to set the extent or zoom level and add the layer to the map.  The 10.2. API simplifies this workflow tremendously.

MapOptions

A simplified use of instantiating a MapView with a defined basemap, zoomlevel, and center uses the MapOptions class. A typical use of this workflow is defined below:

 
MapOptions topo = new MapOptions(MapType.TOPO, 23, -110, 9); 
MapView mMapView = new MapView(this, topo);

You can now easily switch basemaps using the setMapOptions method using a new MapOptions class:

MapOptions streets = new MapOptions(MapType.STREETS);
mMapView.setMapOptions(streets);

This will change the basemap in your MapView to the MapType.STREETS basemap at the default extent of the STREETS basemap.  In order to honor the extent between basemaps you must get the maps extent prior to switching basemaps and set the map extent with the setOnStatusChangedListener method.  For example:

Polygon extent = mMapView.getExtent();
mMapView.setMapOptions(streets);

// honor the extent when switching basemaps
mMapView.setOnStatusChangedListener(new OnStatusChangedListener() {
    private static final long serialVersionUID = 1L;

    @Override
    public void onStatusChanged(Object source, STATUS status) {
      mMapView.setExtent(extent);
    }
});

The examples above introduced the MapOptions class usage in Java. However, instead of using Java in your activity, you can assign MapOptions to your MapView in the XML Layout using the mapoptions attribute.

<!-- MapView with MapOptions settings for Topo basemap, zoom level, and centered in Costa Mesa, CA. --> 
<com.esri.android.map.MapView 
android:id="@+id/map"
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
mapoptions.MapType="topo" 
mapoptions.ZoomLevel="13" 
mapoptions.center="33.666354, -117.903557"/>

Now from Java you can instantiate your MapView with a single line of code:

// Retrieve the MapView, Basemap, ZoomLevel, and Center from XML layout
MapView mMapView = (MapView) findViewById(R.id.map);

Please refer to the Basemaps sample to see the full programmatic pattern in use by an app.  You can use the New Sample Wizard in your Android SDK 10.2 Eclipse plugin to import the project.

In Part 2 of the simplification series we will take a look at the new ArcGIS Android Application Framework to see how we can use this modular component of the ArcGIS Android SDK to further simplify working with graphics and geocoding.

Author: "Dan O'Neill" Tags: "App Developers, Developer, Mobile, Andro..."
Comments Send by mail Print  Save  Delicious 
Previous page - Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader