Transcript

00:01I'm a...my name is Bjorn Kuiper.

00:03I'm going to present a little bit about ArcGIS Runtime for WPF.

00:07Who already used the Runtime here?

00:10Did anybody use the Runtime?

00:12Alright. That's one.

00:14Because it's still in beta 2, so not a lot of people had an opportunity to look at it.

00:19Is anybody...did anybody went to the other part one and part two meeting that was here from Esri conference?

00:26Great.

00:27I'm going to repeat a little bit but not much of that.

00:29I want to try to delve a little bit deeper as a real developer and show you what you're actually doing and how things look like.

00:36So let's continue.

00:39So I'm going to go back and do a short introduction about ArcGIS Runtime and what it is and what it means...

00:46...and then I'm going to show you different ways of consuming data and how that works, dynamic layers, which is really neat...

00:53...and then some tips and tricks that we use as a developer and the current limitations of ArcGIS Runtime beta 2.

01:00I already heard most of them are already solved in prerelease that is coming out in April.

01:06So, so I really like this picture.

01:09I got it from the presentation that the Runtime did last year on the user conference.

01:15It actually shows you great what Runtime is.

01:17It's basically...you have your WPF API living in your application, and that enables you to start in Runtime your ArcGIS Runtime.

01:27And basically it's the same way as ArcGIS Online or ArcGIS Server.

01:32It enables you to host the map and consume it into your application.

01:36So in the past, you could only go to ArcGIS Online or ArcGIS Server, but now you can also locally consume your maps...

01:43...and it's just a regular service that you can consume.

01:50So I'll tell you a little bit more why we're interested in doing this.

01:53We don't want to use ArcGIS Server.

01:55Our customer has an application that used to be WinForms, and they want to move over to WPF...

02:01...and they had ArcGIS Server, but ArcGIS Server deployment for a client application is, of course, not ideal.

02:08You have to configure it.

02:10You have to have somebody that is educated in how ArcGIS Server works, so it's not really a good solution.

02:18And, furthermore, ArcGIS Runtime and WPF are 64 bit, so we want to get rid of ArcObjects as most as possible...

02:28...and ArcGIS Runtime with geoprocessing packages gives us some opportunities to do that.

02:34So...yeah, and feel free...well let's do the...if you have any questions, we can do that at the end, and I've got some samples.

02:43Everything that I going to show, I got here on the USB sticks, so at the end of the presentation, you can get one.

02:48My card is also here, so if you have any questions, please ask me.

02:52I'm looking forward to working with other people that actually going to use Runtime and share experience.

02:57It's a really cool product, but...

02:59Okay, so getting started, if you went to the other presentation, they already showed this great sample application that they have.

03:07It shows everything basically what Runtime and what the WPF SDK at the moment can do...

03:12...and I can actually run it up started here as well.

03:19Of course you will see the second, so...

03:29So this application, it's there when you install the Runtime SDK, and it has all kinds of great examples.

03:36This is a great way to start your investigation on how Runtime works and what the WPF SDK is.

03:43You can't miss this. You should really look at this. This is really nice.

03:50And also they have Visual Studio 2010 templates.

03:54I did everything with Visual Studio 2010.

03:56They probably have 2008 as well, but I don't know. I'm not using that.

04:01I'll show a little bit more about that and use that as a demo to show a little bit more about how Runtime works in the background.

04:09Currently, it's in beta 2.

04:11We already heard, I think officially and otherwise unofficially, they're going to do a prerelease in April...

04:16...and then they want to be back on the official release with 10.1 in July.

04:20So the real release should be there at the same time when all the other 10.1 products are going to be released.

04:30Now I want to show you a little bit about the demo, about the default template, and about licensing.

04:36So...and what's happening in the background.

04:42So let's open a new Visual Studio.

04:49So when you do new projects, Visual Studio, ArcGIS, WPF, and here you can start.

04:59I'll just...I won't edit.

05:06So out of the box, I've got already an application that has code available to start Runtime and to start your own service in the background.

05:15So, as you saw official on one of the first slides, you can start and stop Runtime within your application to host up services...

05:28...host up maps in geoprocessing clients.

05:30Before that, you first have to set a license and start your server.

05:34So let's do this.

05:37If you run it without anything, we'd just get an empty map.

05:40So...but...we can show this.

06:00So now actually I'm starting up a Runtime, and what the interesting part is here is going to be in this piece of it.

06:08Here you see, and I can remove it again and disable it again, and you will see this is not there.

06:14Here it's actually starting the Runtime and saying, the Runtime has been started, and this is my URL.

06:19This where I am, and if I'm going to add a map, and I'll show that in the second demo, it will be hosted on that URL...

06:26...a part of that URL, and I can show you how this already looks...

06:29...and this should be familiar for anybody that works with ArcGIS Server.

06:39Open it in Chrome.

06:42See, and now I haven't hosted anything, but if you know ArcGIS Server...

06:46...this is how it would look like if you go to the server and look at it as well.

06:50So that should be sort of familiar to you.

06:58So...and here you have all kinds of codes, but I'll show that in the second demo of adding map packages that you can consume...

07:08...and that will start something up on the server. Sorry.

07:13So the results also interesting to see...trying to get the DOS manager that Runtime is actually running here...

07:27...and they also showed that during the presentation in part one and part two.

07:31You can see the Runtime is running, and as more services you start up, more processes will be running...

07:36...and it's a great way. They did a great way in making speed really important in performance.

07:42So it utilizes...maximizes your CPUs and everything if you want to run it.

07:50So it's really made for performance, so it's really nice for that.

08:00Sorry, lost my presentation.

08:13Yeah and so I'm going to show a little bit more later on in the background.

08:19I just want to cover as much as possible so you got a little bit of an idea what's going on...

08:22...and then you can pick and choose what you want to look at.

08:25But one of the reasons as well what I was telling, we want to get rid of ArcObjects as much as possible.

08:30We're doing a lot of, in the app that we're converting, we're doing a lot of stuff that involves ArcObjects.

08:35ArcObjects is 32 bits. We want to go 64 bit. We want to utilize the performance.

08:40And also, here as an example, this is only the beginning of a simple buffer operation on a feature class.

08:49This is only one-tenth of that whole code that you have to write to do that in ArcObjects.

08:56And here I've got ModelBuilder.

08:57I'm doing the same thing, and I've only got like four items, and it's easy to comprehend.

09:02I can look at this. I immediately see what I'm doing.

09:05So the abstraction that you get, it's great.

09:07So instead of writing hundred lines of code and then giving it to somebody and there's a bug, and you have to go...

09:13...Oh, what's going wrong?

09:14Now you got a nice model, you separate it, you make a GPK of it.

09:20So instead of having it in your client, you have a separate package, so if you ever, ever have a problem...

09:26...you don't have to recompile your client code.

09:29You just push out a new GPK and everybody's happy.

09:32So deployment of improvements on your processing is also improved when you start using GPKs.

09:39And you won't be...you probably won't be able to completely get rid of ArcObjects in certain cases...

09:45...because performance-wise you maybe don't want to go a GPK every time.

09:50But if you're doing long-running operations that, yeah, that, yeah, well, it all depends.

09:58I can't really give a good example, but you have to consider performance inside the app...

10:04...or can I just launch it off and wait for the result and get it back.

10:08But this is a great way to get some abstraction and put it in a GPK.

10:14I really like the ModelBuilder. It's a really nice tool. Yeah.

10:21So I'll demo a bit of that.

10:34And so last year I also did a presentation on Silverlight and about doing dynamic layers inside Silverlight...

10:43...and using a geoprocessing task with a map result and getting the result back in your app, and I used ArcGIS Server for that.

10:57But now with WPF, I can just run Runtime and host the GPK to buffer process that does that with a result map on my local drive...

11:06...and I can just do the same, and I actually have that here, so I can do Execute buffer, and now it will...

11:12...it already started up in Runtime, and I'll show you in a second, started up the Runtime in the background, sending my request...

11:19...and the first time it's a little bit slow because it has to start the Runtime, but if I would do it again, it would be much quicker.

11:25And here I got the status it's actually doing, and as you can see now, I've got a buffer around my initial feature...

11:34...and it's all local.

11:35I didn't go to ArcGIS Server.

11:38And to show you if you go in the app...I made a shortcut as well, but I'll show you here, it started the Runtime again...

11:53...and I actually made a shortcut in the app that enables you to directly open that server.

12:00This is the same page.

12:01And here we got ArcGIS Server again, and now you can see I consumed a map package...

12:06...Acadia, it was original feature without the buffer, and I exposed my GPK with a map server result...

12:12...so it starts two additional services, one GP server and one map server which [unintelligible] buffer.

12:18So and I'm actually just executing on this one, and you could also look here how that looks like and what the input parameters are.

12:27So this is a really good way of understanding what's happening in the background and what's going on.

12:32And you can also see it in Fiddler, which is a great tool.

12:38I don't know, is everybody familiar with Fiddler here? Do you know...show some hands. I only see one or two hands, so that's more.

12:45Okay. Great. Fiddler shows all the HTTP traffic that's going on, and you can also make it show...your ArcGIS shows up...

12:54...and it's showing more stuff right now as well, but I should have put a filter on it, but you can see here that I submitted my job...

13:05...[unintelligible] and that it's getting a status back, and eventually it's getting the result back.

13:13Now let me show here and this should be image.

13:22See, and actually, I can see the image here as well.

13:24So this is a great way for debugging as well.

13:26So what I'm doing right now, like I said, the ArcGIS Runtime is a separate application, but everything is on the REST endpoint...

13:33...it's HTTP, so my API, my WPF API starts up this Runtime and then starts communicating with this Runtime over HTTP.

13:42And if you want to know, or something is going wrong, do I send the correct parameter, am I actually hitting it right...

13:48...and normally all those things should work, but there's always cases where you want to know and double-check...

13:53...and this is great way for checking.

13:55Now I can see, Oh, I actually getting a result back, so why is my app it not showing.

13:59Maybe you're doing something wrong, and those things, though, it's a really powerful tool.

14:05I'll show a little bit more about that later on.

14:09And for that tool to work, I'm not going to show it anymore, because I heard that in prerelease, they now have a tool...

14:17...under Programs and in ArcGIS, where you can set the settings for your ArcGIS Runtime...

14:22...where you can set that you want to debug your local HTTP traffic, and that's what you have to enable for using Fiddler.

14:34You used to be able to do that through a conflict file, but the Runtime team told me...

14:39...please don't tell that, because we have a tool now in prerelease where you can actually do that.

14:44But it's just JSON file that they configure where you can say HTTP traffic do local host. I'm not going to show that.

15:01So...and what's also interesting, so I'm getting this submitted job data back, and this is all basic geoprocessor...

15:08...if you're familiar with that.

15:09You do submit job. You listen on the...it's all asynchronous, so you listen on status data coming back...

15:16...and every time I'm getting status back, so I log that status to this window.

15:21I can go a little bit more in detail, but we have some time constraints, so I'm not going to do that.

15:26But here you can see where the data's actually created, and this is also really helpful...

15:31...if you have a big GPK that generates multiple temporary files and something is going wrong in that whole process...

15:41...and you don't get your result or [unintelligible] is awkward and you don't know what's going on.

15:45Now you know where it's being run, so you could go with ArcCatalog.

15:49Go to the directory and look at the data that is generated, so let's look here.

15:55It's in...do, do, do...I can copy this whole directory, and so...here is my result as well, which was generated...

16:25...and is now made visible to the map service when I'm zooming in and zooming out, but this is the temporary result.

16:34So if you generate more files in between, so first you're going to do a buffer and then you...

16:43...well, maybe you add some features, and then you do a buffer and some other features, other operations.

16:50You can see all the result files in here, in this directory.

16:52So this is a great way for debugging as well.

17:01Another thing that I want to show...so you can also execute multiple things at once.

17:06It's all asynchronous. You go into a REST endpoint.

17:09So if you have to do hundred, maybe thousand operations instantly, you can...instead of doing a follow up [unintelligible]...

17:16...you could still do a follow, but instead of waiting for each one to finish, we'll just kick them all off, and then wait for the response.

17:22You can use tokens to determine which one has finished or which one has not.

17:27So here I'm doing a simple calculate field, which is also a GPK, and I'll show that also, the directory structure, later on.

17:35And let's just kick some of those off.

17:42And so you see already that it's all asynchronous and that even...

17:45...I started with a token of one, and you see that five have actually finished earlier, and, too, it's a simple expression...

17:51...normally...because I was so quick...

17:53...now it worked, but you could execute multiples and it will just come back when it's finished.

17:59So we have some like 10 [unintelligible] operations. You just kicked them all off at once, and then you just wait for the response...

18:05...and you can show the user I'm generating. You could show a progress bar, and you get this rich experience for the user...

18:11...instead of having this blocked UI but are not seeing anything and where everything is gray.

18:16So it's also helpful. Okay?

18:23I'll show a little bit of code, and then I'll try to move on to dynamic layers.

18:44So here I'm adding the map layer.

18:52So here I'm getting my local directory, and this is my MPK, so MPKs, GPKs, it's really huge.

19:00You have to, for Runtime, that's what you want to know about, and it's nice you can share them...

19:05...you can e-mail them back and forth to people and say, Oh, I made this new tool. Test it out, and I'll send you a GPK...

19:10...or, I see, I made a new map and I send it to you, and you can consume it in your app.

19:15So here I'm consuming my Acadia map file and displaying it, eventually adding it to the map layer.

19:23And then for the buffer tasks, so actually I'm...I use my GPK. I can show you the directory structure.

19:32So here I've got my buffer GPK, which does the 10-mile or 10 k buffer around it or maybe more...

19:40...and to start that up, I'm doing a similar thing.

19:43I'm saying, Well, where is that file located? This is my file.

19:46I said, Well, try to get that server if it already exists, and if not, this function will automatically create it.

19:53So checks, Oh, do I already live, no.

19:55Then I'll just start one, and this one is actually a map server result, so you specified that at the beginning...

20:03...and then it will start that up, and then I'm executing the buffer, and this is what I was talking about...

20:11...the default structure where you create...you get to URL off the...the name of the URL on the Runtime...

20:20...so this will give you the URL from the service on the Runtime, then you set your input parameters...

20:27...and then you do your default geoprocessor.

20:29So you say, Start a new geoprocessor with that URL.

20:33When there is a status update, give that to this event, and I'll populate that back to that window that I had in the bottom...

20:40...and if it's completed, go to this function, and show me the result or get the result...

20:45...because I have to get the result and then show it, and if it's failed, show the user just a message box that something had gone wrong...

20:52...and then just kick off my job.

20:54So first you view a sign, of course, the events, and then you kick off the job.

20:58So...and I can go in more detail, but this is all in the code, and you can get the USB sticks for that, and the code is online...

21:04...so you just have to look at that yourself, and you get a known or find that out. Yeah.

21:15So another big thing is dynamic layers, so in the presentation I did last year, we generate layers on the fly...

21:23...and I already showed that with the buffer, and in our case, we generating noise contours...

21:28...and we directly want to show that to the users, so there's different ways in doing that.

21:32The first one I already showed, the geoprocessing with the map results, so I'm kicking off this task.

21:39I already have the input feature, and I'm kicking this off and getting it back as a map server result...

21:44...and that's sort of...you could save it in a geodatabase, but this is a great way also for doing it.

21:49On the fly is temporary results, because you can store it in a cache, and it will be there temporary.

21:58Another way, what with the problem that we had is, we have feature classes that we generated or that live in the GDB...

22:05...that we want to show as a map package, like directly, so we know we have files in the GDB...

22:13...and we want to consume them and display them, and fortunately at the moment, you can only do that with map packages...

22:19...so you would have to create a map package, first an empty map at that feature, then create a map package...

22:26...and then consume that map package.

22:28That's...you can do that.

22:30Currently in beta 2, that feature...you can do all of that in Python, and currently in beta 2, we couldn't get it running.

22:38There were some issues with beta 2 that prevented us from doing that, but that would be the way...

22:43...and hopefully, Esri will improve this in the future, because we would love to directly connect to...

22:50...saying directly, Well, here's my feature in the GDB. Just show this to me.

22:54Should just load this into the map, but that's not supported.

22:58But they have a nice other feature, which is dynamic layers, and I'll show that.

23:02Well, you can actually do sort of that, but you have to use initial map package, and then you can change the settings of that server...

23:12...to actually point to a feature or CORRECT to a file geodatabase.

23:16I'm going to show that. Let's kill this app.

23:36And for this to show you first, let's show the data.

23:47So I've got two layers in my file geodatabase.

23:53One is the regular Acadia National Park, and one is the one with the buffered scenario, so...

24:00...and I've the map package here that also has Acadia.

24:04So when I start out, there is...I start out by just consuming the map package, which already had a map of Acadia.

24:17Sadly enough, you can't consume an empty map package because we would...I will get...delve into a little bit more of that later...

24:24...but you would like to just directly point to your file geodatabase, but that's not possible.

24:31So we first consume an empty map package, and then I made the button here.

24:36Now I'm changing my references, saying, I don't want you to point to...this layer shouldn't point to this...

24:43...feature anymore in the map package, but I want you to point to the file geodatabase.

24:47And so now I'm picking up the one in the file geodatabase...

24:53...but as you can see, the legend is also not updated at the moment, so that's a problem, and now I can switch back and forth...

25:01...but this is really cool. It's really quick as well.

25:03So I'm just changing, oh, I clicked wrong, can just switch back and forward between the two layers...

25:12...and I'll show how that little bit works in code.

25:14So this way, you can really, if the user...you would be able to show a list of features in a file geodatabase...

25:21...and then the user could just select, Oh, show me this one, show me this one, or show me...and he could switch back and forward.

25:26So that's really nice.

25:28That's something you want locally, and so here's the code, so for that you start a dynamic...a local map service...

25:48...and here's the original Acadia map that I start, and here's the data folder, which has my file geodatabase...

25:56...but to make this work, you have to set up a dynamic workspace.

26:02So I'm doing that here, and then I'm showing the original map that is in an MPK, so I'm just showing the MPK here, the original one...

26:11...and then I enabling my switch button, and here is the more advanced code that switches from my map package...

26:22...to all of a sudden to this dynamic layer, or this layer that is in the file geodatabase...

26:27...so this is the dynamic layer feature, and you can see I get the original layer that is...got the original layer that is on the map control...

26:38...and then I'm redefining that original layer, and I'm saying, Well, get me the dynamic layer info of that layer...

26:45...and then I'm changing that.

26:47I'm overriding that data over here and saying, Well, you have to point to this new location, which is this workspace and this layer...

26:56...and then I'm assigning that to the original layer that I have on my map control.

27:02I specify a renderer.

27:03I didn't find a way to get the original renderer and copy it, so I have to specify a new renderer and build a new renderer...

27:12...and then I refresh my layer and then it will show up.

27:15So...how many more minutes? Yeah, I have four more minutes.

27:20So let's go back to the presentation.

27:25So it's a lot of data. I hope you get a general idea of all the things that you can do...

27:31...and I can tell you more about it if you have questions later on.

27:37So just a couple of tips and tricks.

27:40Fiddler is really helpful. I'll show that later.

27:42I can quickly show it again for how...you can also understand how dynamic layers work.

27:47So let me do that really quickly and show that we were just doing dynamic layers...

27:59...and if you do dynamic layers, you all of a sudden get this really long string.

28:03So to get better understanding of what's happening in the background when you do a dynamic layers, this is really helpful.

28:09So I don't have enough time to go into it to show you what's going on, but, actually, they just sent to the server this whole string...

28:15...this whole JSON, or no, this whole string saying, I'm going to reset this.

28:20You have to point to this. You have to load this one and this one instead of just starting a new server...

28:24...they're just sending a big request to the server that just sends back this image.

28:29But, that's why Fiddler is really helpful to better understand the whole product as well.

28:35So Fiddler, really recommend it.

28:41Yeah. So the Runtime website that I quickly showed, so when you start the application, and when you start the local server...

28:47...you get this URL in your output screen.

28:49That is your Runtime website.

28:50That's why your services are being hosted.

28:53So if you ever have problems, you want to go there and see, is my service running, and you could even...

28:59...like I had with the calculate field, you could go to the service and say, Put my expression in there...

29:04...and just submit that job on the server itself and execute and see if it's working there...

29:09...so that's a really great way as well to know what's going on and if your services are there.

29:15Use of forums, Mike is here as well. I had great help from Mike.

29:20He's one of the Runtime team.

29:22Any questions, you can always get help on the forums. They're really quick, really helpful.

29:26So that's definitely a plus as well, and I can't emphasize it enough, the WPF samples application is really, really helpful as well...

29:35...especially when you get started.

29:39So it's now...couple of the current limitations that we ran into that we experienced...

29:43...so, we experienced that not all the toolbox, the Python and...with the ArcMap toolbox and the toolbox that you can use in Python...

29:52...were not working correctly or not supported yet, but what I understand, that has been fixed in prerelease.

29:57So I'm really looking forward in using that.

30:02The dynamic layers functionality, like I said, there's some...couple of things that we think are still lacking.

30:09The legend is not updating. You have to consume a map package first.

30:12I would love to directly point to a file geodatabase and directly say, Just load this map for me.

30:18So it's a nice feature, but we would like some improvements there.

30:23No support for server extensions.

30:26That would also help us to further get rid of ArcObjects and write our own server extensions that...

30:33...then we could write service extensions that use ArcObjects, but then they won't live in my client code...

30:38...and then there would be separate packages, and so I would be able to run 64 bit on my client...

30:45...and have the separate abstraction of my functionality in extensions, so, yeah, I'm looking forward for that as well.

30:55And so the release cycle is a little bit behind on the official, but I heard that the official release is going to be released with 10.1 as well.

31:02So in July, I think it is, you should be able to get an official release from the Runtime as well.

31:11And so, that's it. So that's my Twitter account and my e-mail address.

31:15I've got the USB sticks with the source code and the presentation here, and my card is here.

31:20And, yeah, please contact me and especially when you're starting working with this... I'm eager to talk with people that are trying to do similar things and yeah...So if you have any questions...

Copyright 2013 Esri
Auto Scroll (on)Enable or disable the automatic scrolling of the transcript text when the video is playing. You can save this option if you login

Starting with ArcGIS Runtime SDK for WPF

Bjorn Kuiper of Foliage offers best practices for getting started with ArcGIS Runtime SDK for WPF.

  • Recorded: Mar 28th, 2012
  • Runtime: 31:30
  • Views: 1278
  • Published: Apr 30th, 2012
  • Night Mode (Off)Automatically dim the web site while the video is playing. A few seconds after you start watching the video and stop moving your mouse, your screen will dim. You can auto save this option if you login.
  • HTML5 Video (Off) Play videos using HTML5 Video instead of flash. A modern web browser is required to view videos using HTML5.
Download VideoDownload this video to your computer.
<Embed>Customize the colors and use the HTML code to include this video on your own website
480x270
720x405
960x540
Custom
Width:
Height:
Start From:
Player Color:

Right-click on these links to download and save this video.

Comments 

Be the first to post a comment
To post a comment, you'll need to login.
If you don't have an Esri Global Login ID, please register here.