Accesing SVG layers with React - reactjs

I am doing a school project in which I have a floor layout svg that has each room in it's separate layer. I would like to assign an onclick function with some input data on each of these using map. I can't seem to figurate out how to do it though. I was told this is possible and from a game called Rival Regions which uses a clickable SVG map with each path having it's own data it seems possible but I just can't find any mentions on how to do it.
Example of how each path (or at least it seems it's the path doing it) is clickable and has it's own data about the state, region etc.
How to map the svg, how to feed it data / onclick handle. Anything that could help me or guide me in the right direction is appreciated!

Related

SceneKit DAE animation not appearing in attributes

I'm trying to carefully word this question because the problem doesn't appear to be that the animation isn't being imported. I can see the animation as <untitled animation> in the scene graph, and I can play the animation in Xcode; the issue is then locating the animation as an attribute to any of the objects. This is what I can see in the scene graph:
But, when I try and locate the animation here:
... nothing appears. So, it seems that it isn't importing the animation as a CAAnimation object with a key.
I have tried to programmatically enumerate through the child nodes to find any CAAnimation objects, but it doesn't see any. Other scenes work perfectly however.
What do I need to add to the DAE file to get it to build the CAAnimation object properly?
Worth pointing out that the 3D model and animation was exported from 3DS Max using OpenCollada. I don't know what the best practices are for exporting collada to SceneKit, and if anyone has any useful information that would be great. Apple don't seem to have anything.
The SceneKit editor in Xcode does not display the root node in the scene graph view, and it might be the one that holds the animation.
You should be able to retrieve the root node's animation programmatically.

Efficiently display multiple markers on WPF image

I need to display many markers on a WPF image. The markers can be lines, circles, squares, etc. and there can be several hundreds of them.
Both the image source and the markers data are updated every few seconds. The markers are associated with specific pixels on the image and their size should be absolute in relation to the screen (i.e. when I move the image the markers should move along with it, but if i zoom in, they should take the same space of the screen as before).
Currently, I've implemented this using the AdornerLayer. This solution has several problems but the most significant one is that the UI doesn't fare well under the load even for 120 such markers.
I wanted to ask what would be the best way to go about implementing this? I thought of two solutions:
Inherit from Canvas and make sure it is invalidated not for every
added marker but for a range of markers at once
Create a control that holds an image and change its OnDraw to draw all the markers
I would appreciate some pointers from someone with experience with a similar problem.
Your use case looks quite specialized, so a specialized solution seems in order. I'd try a variant of your second option — extend Image, overriding its OnRender method.

Is there a documentation on how to use weather overlay from noaa.gov?

I am trying to add a weather overlay to my maps , the tile images on Noaa.gov are what i want but i couldn't find any documentation on how to construct url to consume & arrange tiles of overlays for a given lon/lat. below is the a sample url that returns a single tile.
http://radarcache.srh.noaa.gov/tc/tc.py/1.0.0/ridge::NAT-N0Q-201211191510/8/62/97.png
update:
The web service i am working on generates a sectional aviation chart/map for a given lon/lat dimension and zoom level . one of the overlays i am rendering on top of the generated base map is weather(radar reflective ..)
based on the information i have (lon/lat, dimension and zoom level) i want to render weather overlay on top of my base map.
the challenge i am facing is how do i get weather overlay using lon/lat ?
After researching a lot i found out that NOAA Tile System uses this Tile arrangement, based on that i was able to get PNG images overlay for a given (lon/lat/zoom) as follows
http://ridgewms.srh.noaa.gov/tc/tc.py/1.0.0/ridge::NAT-N0Q-{0:yyyyMMddHHmm}/{1}/{2}/{3}.png
Where
{0:yyyyMMddHHmm} = date time in 5 minute increments
{1} ZoomLevel
{2} X or tile column
{3} Y or Tile Row
Without more information about what you are trying to integrate into, here is what I know. If you want to create a custom KML file, there is this page that will do that for you. For more info about other layers, check out this page as well.
If you provide more info about your environment, we might be able to help with more specifics.
EDIT:
For just the transparent gifs, see this page here http://forecast.weather.gov/jetstream/doppler/ridge_download.htm
There is quite a bit of information for downloading actual data here http://www.ncdc.noaa.gov/oa/radar/radardata.html

Drawing maps in WPF

I want to draw a map in WPF without using any third party controls.
I need each and every state of all the countries, and based on certain conditions I want to color them.
How can I get the polygon shapes of each state of all the countries?
Here is an SVG file with all the states as separate polygons (look at the source!)
You can convert it to xaml if you want and fill the state differently.
EDIT
Just google for svg world map. One of the first hits seems to be a nice resource.

Bing Maps Layers

I've been working with bing maps in Silverlight recently and have things at a good working order. One quirk that I would like to resolve is that all of my shapes that are drawn on the page get rendered on top of the road layer and even worse, the city names. So if my shapes are opaque, you can't read them. I'm figuring that there must be some z-index type property involved but I'm having a hard time finding any information about it.
Does anyone know how to set the stack order of the layers provided? Is there a particular index of the existing layers (roads, street names, city names and so on)?
Don't think so. The base Bing map layers (map, aerial, aerial with labels) are just prebuilt tiled images. Shapes added will be on top of those images.

Resources