We help IT Professionals succeed at work.

Map of US as a SVG file - how to merge groups of states

snix123
snix123 asked
on
Hello experts:
I have a map of the United States as a SVG file.  I need to use SVG because I need the outline of the states to select them, etc., for my project.  What I want though is to merge several states into one "object", so that object is the selectable unit instead of each individual state.  So, I would like only the outline of the state group to be the object.  Is there any way to do this in Illustrator?  For example, all land-locked states of a group would not have an SVG outline, just the stroke.  Thanks.
Comment
Watch Question

Commented:

Hello snix1243,

Select first state and constantly hold SHIFT button down and then select second state then third etc.

When you select all these objects then go to Object menu and then choose Goup option.

After that you will be able to click only on one state and all group will be selected so you can move this group with mouse or Copy to new document etc.


regards

Nrisimha
Technical Director
Commented:
Hi

This all depends on the SVG structure, if the States are all independently laid out then the above advice will work. If they simply share a single stroke as a common border, it won't.

I assume there are options to group all the lines into a grid and then draw a new object which is larger than the grid to be placed behind the grid. Then you can select both grid+object and use the Pathfinder>>Divide tool to cut the grid from the new object.

You should now have a group of states-shaped objects which you need to ungroup. The ungrouped states can now be combined using the Pathfinder ShapeMode>>Unite tool if you use the SHIFT click selection.

If this does not work can you post the SVG? Not sure how much time I get to check this out, but it is hard to guess without seeing it..

cheers
capt.

Author

Commented:
Thanks, I will try that.  I already know how to select and group the states using the suggestion from Nrisimha. Each state is on its own layer and each has its own border (stroke).  I will try to do what you suggest.
captainTechnical Director

Commented:
If they are all separate in their own right, you only need to do the last segment above; select the ones you want to combine and then use the 'Unite' command ...


hth
capt.

Author

Commented:
Yes, it does seem to work, but when I do this the outlines of the original states disappear, I suppose the paths disappear.  I would like the path (selectable area) to be a group of contiguous states and the path is the outline of all of them.  But the states are discernable still.  I hope this makes sense and thank you.
captainTechnical Director

Commented:
Hi

I don't know what the most elegant route would be without looking at the file, could you sent a screenshot of what you like to achieve?

capt.

Author

Commented:
Sorry so long to get back...really busy here.  I was finally able to try it, and it seems to work ok, thank you captainreiss.