svg - Scaling down Raphael World Map -
i'm creating splash page project website. instructed design world map menu on side , add blinking effect while hovering on sub menus.
i'm done transforming/scaling map, i'm having problem when hovering on sub menus, small red circles doesn't pop on should be. without .transform() method, small red circles pop correctly, gives me big cropped map.
i used .transform() method scale world map down.
i put .transform() method here:
r.path(worldmap.shapes[country]).attr({stroke: "#9b59b6", fill: c, "stroke-opacity": 0.25}).transform("s.628,.740 0,0");
in code of locations of cities stored lon/lat coordinates in name attribute. parsed through world.parselatlon function calls getxy() . in function getxy returning coordinates need transformed well. there interesting number manipulation going on there (multiplying 2.6938 , adding 465.4) - adjusting coordinates size of image. have changed size of image, these need adjusted
Comments
Post a Comment