Using the jVectorMap World Map, I want to be able to display two different scales for different countries.
For example, have gradients from white to black for some countries and gradients from white to blue for the other countries.
How can I do that please?
Thank you.
If you take a look at this demo you can see that series.regions is an array. So you can just pass several series if you want to use more than one scale for the the visualization.
Related
I have a THREE.PointCloud that contains a large amount of points. In the screenshot above, each point is mapped to small purpleish circle.
I'm trying to figure out a way to display text labels beside each points.
My first attempt was to dynamically create text via the canvas and display the textures inside THREE.Sprite objects. This achieved the look I was going for, but the performance hit was significant. I quickly learned this wouldn't scale past just a few hundred points.
I'm thinking there may be a way to do this with shaders but I cannot figure out the approach. The method used in animating a million letters used a texture of glyphs, and mapped the letters to the glyphs:
I'm thinking I could do the same by creating a THREE.Geometry object and pushing the vertices and faces for each text letter of the labels. The downside is that I want the labels to billboard so that they always face the camera. Billboarding in the vertex shader seems to be pretty straightforward.
My feeling is that there are already some examples out there that combine all of these ideas into a single working example. Any suggestions on how to do large-scale text labels would be greatly appreciated. Thanks!
I figured it out. You have to use a glyph sheet and render each character as a quad using two faces.
The process is outlined pretty well in animating a million letters
I can get away with about a million on-screen characters before performance starts taking a hit.
I have a set of polygons where the position of their vertices (corners) are defined as latitude/longitude values.
I want to use D3 to draw these. I don't want anything fancy (like a background containing the world map, etc). The only thing I want to do is to draw the polygons.
I have looked up on Google for a solution, but what I find is things like http://datamaps.github.io or https://github.com/mbostock/d3/wiki/Geo-Paths and they all show a background of the world map or the like which is what I don't want to do.
Suggestions are welcome.
In your particular case, using the geo functionality of D3 seems like overkill -- all you need to do is use the D3 scales to convert the coordinates to screen coordinates, i.e.
var scale = d3.scale.linear().domain([minCoord, maxCoord]).range([minScreen, maxScreen]);
Demo (based on provided fiddle) here.
I used google maps to make a project that records flood incident in a certain area. I used polygons to represent those floods, since the project is for planning purposes it is required of us to output all the historical flood data into a single map. My problem is if I simply just output all polygons, it would look messy and cluttered. So I was wondering what method I could use to represent these polygons in a better fashion. We were advised to use heatmaps, but I can't seem to find tutorials on how to make polygons into heatmaps. Any suggestions would be appreciated. Thanks!
To turn a polygon into a heatmap, render the polygons in black with high transparency into a white bitmap. This should result in a grayscale image, which will be darker where many polygons overlap. Then convert the gray values of the bitmap into the hue value of a corresponding semi-transparent color bitmap.
Why did the rendering look messy? Did you try rendering filled polygons with high transparency and no borderline? That should result in areas that are more prone to flooding being more "highlighted".
I am doing a temperature geographic online chart, and I have some problems when I try to display the color of each region on the map.
For example, if some region has temperature higher than 40, it will display with the Red color on the map, or if the temperature lower than ZERO, it will display with Gray color on the map.
Currently, I use transparent image nested in a div, and using margin and position css to connect them together to create the total map. If I want to display it with red color, I use the image in Red folder.
My problem is that in the website, it display many divs, each one for each region.
I want to join them into a single image to increase performance how can I do that?
I am using MVC4
Many thanks for suggestion
I would suggest you use VectorMaps instead of image manipulation. Here are few links which you might take a look
http://jqvmap.com/
http://jvectormap.com/tutorials/getting-started/
Let us know if this helps.
I'm trying to perform image recognition via a SIFT algorithm using solid shapes.
To improve the performance, I would like to take the image (captured from an iOS camera), make all non-light colors a dark red and make the remaining pixels transparent.
An example of a before and after of what I'm trying to achieve is attached in the images on this question.
Assumption: the images are always solid-black shapes and printed on plain white paper
Can someone please help me with this or point me in the right direction?
As provided in this code, you can simply iterate over the pixel data and compare each color of the pixel with the value you want to filter. But before you should maybe apply some filters for better results.