Skip navigation
All People > odoe > GeoDev Adventures > 2015 > July > 16

Blend all the things

Posted by odoe Jul 16, 2015



The 3.14 release for the ArcGIS API for JavaScript was released today. You can read the announcement here and of course the documentation is updated here. There's some really cool stuff in this release and lots of bug fixes. However, one thing I think is really cool is some of the new visualization capabilities being added to the API. Hot on the heels of Smart Mapping introduced in the 3.13, which I talked about here, they have now introduced a new renderer called Blend Renderer.


What is is that makes the Blend Renderer so cool? That it doesn't work in IE8! I'm kidding, but thank goodness we could throw that crutch out the window for Blend Renderer, because it allows you to do some really cool stuff when making your maps. So what does the Blend Renderer do? As the name says, it blends your values together. But it does so based on the data. Look at the docs for examples. Let's say you have 2 values:


Beer drinkers

Wine drinkers


Now let's assume you have a parcel with 20 people and 19 out of 20 are beer drinkers. The color would be a strongly blue. Then you have another parcel with 20 people, but 10 beer drinkers and 10 wine drinkers. So the color will be more purple. Or somewhere around there, I'm a developer not a color wheel. But you should get the idea.


Ok, so you have that down. But you're like, yeah, that's like a color ramp type thing man. It's called a Blend Renderer for a reason. Take a closer look at the docs and you'll see that there's a blendMode. What does this blendMode do? It determines how these colors blend together. They aren't just making up their own blendModes, these are the standard available composition types in the Canvas API, which is linked in the docs. This gives you the ability to do some very cool visualizations of your data. Maybe you want a different blendMode based on your basemap or some other data you are going to display on your map. This gives you some creative control over how you want to display your data.


The Blend Renderer is released in beta, so if you burn your eyeballs out from some funky combo of data and blendMode, remember, it's beta.


Here's a little sample taking a demo from the docs and adding a pulldown to test out the different blendModes.


Got out and make some cool maps to go with your cool apps.


For more geodev tips and tricks, check out my blog.