Dynamically rendering polygons server-side? - maps

I'm trying to implement a polygon based heatmap (i.e., instead of the color transitioning smoothly between two points, the color is the same within each polygon and changes across polygons).
The polygon color will tell the user which area's of the map are "good" and which are "bad". Similar to what these guys are doing here (http://illustreets.co.uk/explore-england/).
However, the color of the polygons will depend on the user input. Therefore, they have to be rendered dynamically. I don't think that the client will be able to handle the rendering, so the rendering will have to happen on the server.
I'm currently exploring ArcGIS as an option.
Does anybody know how to accomplish what I need in ArcGIS (or any other products)?
It would be best if I can find sample code that does something similar.
Thanks!

Based on our discussion in the comments, I can suggest the D3.js library. It is designed to make dynamic visualization easy.
http://d3js.org/

Related

How do resize images easily in the browser/before they get to the database?

I'm trying to do what I thought would be a super simple thing. I have users uploading images to my site, they can upload any images. I'm using a react carousel to render them. I noticed whilst testing that obviously images different sizes and this makes the carousel a bit weird when rendering them as it can jump between rectangles and squares. so I figured the best way would be resize all the images to the correct size. however, I'm having issues with this.
I've seen lots of answers online like so: resize image before upload using javascript
but I don't want to copy 50~ lines of code and just use if I don't know what it's doing. I searched for packages and found this: https://www.npmjs.com/package/jimp which looks perfect but I got some errors with this I couldn't figure out.
all I want when uploading them is to simply check if width != height and then resize to say 300x300. I am using firebase and I am using their resize image tool. again it's really good but you specify dimensions but I think it treats them as maximum rather than actual. obviously I don't want to lose image quality too and stretch the image. so I'm wondering the best way to achieve this.

Controls for creating a map?

I need to find a control that can be used to construct a map.
I'm looking for something where a user can specify a location and then drag markers from a toolbar onto the map. Loading/saving would be a plus
I tried Telertik Map , IG and also Component One but I'm not 100% sure about these products.
You might try hosting Google Maps in WPF; it has a fairly complete API.
Any of the components you listed would definitely get the job done (personally, I prefer Infragistics), but they will be expensive.
Finally, you could head a different direction and try to go open-source. SharpMap might be worth investigation. This question has more details.
There is now a WPF Bing Maps Control
http://www.bing.com/community/site_blogs/b/maps/archive/2012/01/12/announcing-the-bing-maps-windows-presentation-foundation-control-v1.aspx

Is there a way to animate the edges of an image in WPF?

We have a few icons in our WPF application. We want to do an animation, pretty much like a small beacon of light going around the edges of the animation, just endlessly going around it, and following the silhouette of the icons. We found a way to do it by manually creating a path around the icons and have the beacon follow that path (which matches the silhouette), but it's too much manual work because we have a lot of different shaped icons. We're wondering if there's a way for WPF to do this automatically, so we just have to program it once, and then using on the rest of the icons.
Any suggestion very welcome.
Thanks.
Edit
Something like this.
Gee. Isn't that overkill to use wpf animation capabilities for that? Can't you just create a bunch of small animations in Photoshop or using something else and just put them in?
Like animated .GIFs. the only problem would be that: if I'm remembering it right, WPF have problems with animating .GIFs as embedded resources. So you have to load them from the disk. Or you can have them as embedded resources, but you have to extract them temporarily to the disk and then load them into your app's window.
If you are using .NET 3.5 SP1 or greater and you are requiring a code solution instead of the animated GIFs, my suggestion would be a Pixel Shader. You would need to write your own Pixel Shader that does the following:
Detect the edges. http://www.codeproject.com/KB/openGL/EdgeDetection.aspx
Takes an input parameter that can be animated with a storyboard that indicates the position of the beacon. http://www.codeproject.com/KB/dialog/WpfParentWindowShader.aspx
Highlights the edge that is indicated by the beacon position parameter and returns the original color for all other points in the image.
If you haven't worked with Pixel Shaders I would recommend downloading the Shazzam Tool, http://shazzam-tool.com/. It includes an interactive development environment to create and test your shader on simple images and also includes a decent number of Pixel Shaders with source code to help you learn about them.

Looking for a simple Silverlight map component

I am looking for a light-weight map component that displays a map of the US and allows users to click on a State and see information pertaining to that state. The data I want to display is in my database. I just need to know what state was selected so I can display the detail. This is something I am doing to get familiar with Silverlight.
All the searches for Silverlight/ Maps I have done so far have pointed me at solutions that are far more complicated than I need. My perception is that using Bing Maps to do this simple task would a waste of the features provide by Bing.
Anyone know of such a Component? Am I wrong that Bing Maps is not the right tool for the job?
TIA!
If you have access to Expression Studio (specifically Expression Design), creating maps as vector based images is quite easy. Poly-paths in Xaml are also relatively efficient to store and serve up compared to images.
You import a map as a background image and use the pen tool to dot-to-dot trace around the country. Combine all those path segments into a single path. Then create a separate poly-path for each state (close them to allow for a fill).
It will take a few hours to build all this (I know having done this for a world map country selector... took 4-5 hours solid for the one polygon styled below):
By having each state represented by a filled polygon-path highlighting (by changing the fill colour) is trivial on mouse-enter/mouse-leave events.
If you want stylistic map, remove the image, otherwise use transparency on the state polygons to show the map through the roll-overs.
Update:
And if you get yourself a graphic tablet and pen this sort of point-to-point work is about 5 times faster than with a mouse!
The interaction with Bing Maps in Silverlight is really strong and provide you with easy communication between the map and your data. I would give Bing Maps a try.
I'm not sure if you've already come across this, but it seems you can also use the control with custom tile sources. Here are a few resources.
http://www.cadmaps.com/gisblog/?p=54
http://developers.de/blogs/damir_dobric/archive/2009/11/16/implementing-custom-map-in-silverlight-map-control.aspx
http://labs.mandogroup.com/skinning-the-silverlight-bing-maps-control/
Custom Rendering in Bing Silverlight Control

Silverlight Organisation chart control

Anyone know which control they used on this site to get the Organisation chart? http://www.yworks.com/products/yfilessilverlight/SilverChart.html
Or any other controls that are similiar?
If not, could you suggest a way on how to get started building one? (Interface-wise, I think I know how to get the data binding to work).
The organisation chart control is their own, thats whole point of the demo page.
The UI elements involved are quite simple rectangular items. The real trick is calculating their placement on panel and routing the connecting lines.
I guess the missing peice of the puzzle is what generically we would call that. If you know that then you have a basis for a web search for algorithms for doing this sort of thing either academically or in some other product entirely, then bring that knowledge to your own Silverlight code.
Alternatively you could just go out buy the product.

Resources