Raise a part of Map

37 views
Skip to first unread message

Swapnil Pandey

unread,
Oct 12, 2015, 11:15:18 AM10/12/15
to d3-js
I want to raise the state where the mouse is, ie if user hovers on a particular state, it gets raised while the rest of the map goes as background. Is it possible ? How can I do it? I am using json for creating a map. Till now I can only change the x and y axis of a state. How to change the z axis? Any ideas ?

IB

unread,
Oct 14, 2015, 12:10:16 PM10/14/15
to d3-js
Swapnil, I think the solution may be to use shape tweening, and enlarge that particular state on hover. Since there is no z dimension in SVGs, it seems like the easiest way to go. Check out this S/O post: http://stackoverflow.com/questions/18537004/trouble-with-d3-js-scaling-a-path-shape

seemantk

unread,
Oct 15, 2015, 9:22:56 AM10/15/15
to d3-js
Hi Swapnil,

A clue that I had received a while ago was to use the DOM function: appendNode.  So something along the lines of
this.parentNode.appendChild(this)

Cheers,
Seemant

Enrico Spinielli

unread,
Oct 19, 2015, 9:05:39 AM10/19/15
to d3...@googlegroups.com
see Animated World Tour from Jason Davies: https://www.jasondavies.com/maps/zoom/

--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages