Customize jQuery Interactive SVG Map Plugin
<p>Background -
I am working on a site for a small group of Hotels. Their current site has an image map with markers on it which point to each location. Problem is that the icons are too big and too many new hotels are being built, it isn't practical to keep doing it this way. There is no room.</p>

<p>My solution -
I found jQuery Interactive SVG Map Plugin on Codecanyon.com and it works pretty freaking well. I can pin point the locations, add markers, and the map has so many features it's almost the perfect solution. <a href="http://codecanyon.net/item/jquery-interactive-svg-map-plugin/1694201" rel="nofollow">http://codecanyon.net/item/jquery-interactive-svg-map-plugin/1694201</a></p>

<p>Problem -
While the map does so much already, it doesn't do everything I need. Here is a short list of what I am trying to accomplish:</p>

<ol>
<li>Clicking on a state centers the state in the view box and zooms in to max.</li>
</ol>

<p>Sounds easy enough, right? The plugin has a "setViewBox" method which has worked for setting the default viewbox and if I call it onClick I can get it to do just what I want, zoom in and center over the state. Here is what is happening however:</p>

<ol>
<li>Jumping to a closer viewbox like that doesn't auto scale the markers, which is necessary to eliminate the clutter problem the site currently faces. Also, it doesn't affect the "zoom" level of the map. Say I can zoom in from 1-5. I click a state and it appears as if I jumped to zoom 5, but the moment I go to zoom it starts from 1, therefore I can zoom in way further than I intended and not zoom out. I hope I am not confusing.</li>
<li>There is a similar situation with panning. If I change the viewbox like I do to get the desired results, clicking and holding to pan suddenly jerks the map out of position, as if the cursor thinks I clicked somewhere else.</li>
</ol>

<p>I would love to give you some code examples but I wouldn't know where to begin. I can't copy/paste the plugin and my code is minimal.</p>

<p>What I am asking is if anyone has experience with this plugin and can offer some advice on manipulating the viewbox without throwing off zoom, pan, and scaling of the markers. Thanks.</p>
