SIGN UP MEMBER LOGIN:    
Resource

jWorldMaps jQuery Plugin

Mahesh Chand Resources Aug 16, 2011
The jWorldMaps jQuery plugin makes it easy to show visitors to your site who's visiting, and where in the world they're coming from.
jWorldMaps jQuery Plugin

The jWorldMaps jQuery plugin makes it easy to show visitors to your site who's visiting, and where in the world they're coming from. It's simple to implement, requiring just a div tag, a reference to the jWorldMaps script library (and jQuery, of course), and a single line of initialization script. The result is a thumbnail map of your WorldMaps account (get one here), which expands to show a more detailed view on mouseover.

Read more and Download Plugin here

Using the Plugin

Using the jWorldMaps plugin is simple, and requires only a few steps:

  1. Add a <script> reference to the jQuery library. jWorldMaps supports jQuery version 1.4 or newer:

       1: <script type="text/javascript" 
       2:     src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.js"></script>

    Note: 2 perf tips…first, as shown above, use a CDN-hosted version of jQuery to improve performance, and second, where possible, locate scripts towards the bottom of the page to avoid blocking downloads of other elements.
  2. Add a reference to the jWorldMaps plugin:
       1: <script type="text/javascript" 
       2:     src="[path on your site]/jWorldMaps-1.0.min.js"></script>
    (you'll need to download a copy of the plugin script library and reference your local copy, or you can reference the CDN version instead):
       1: <script type="text/javascript" 
       2:     src="http://cdn.myworldmaps.net/scripts/jWorldMaps-1.0.min.js"></script>
  3. Add the following initialization code, somewhere after the two script library references, replacing "YOUR-WORLDMAP-ID with the WorldMaps Map ID for the specific account/map you wish to display:
       1: <script type="text/javascript">
       2:     $("#wmContainer").jWorldMaps({
       3:         worldMapId : "YOUR-WORLDMAP-ID"
       4:     });
       5: </script>
  4. You can optionally add initialization parameters for any of the options listed below, for example to disable tracking if you simply wish to display the map, rather than using it to track hits to your site (useful if you're already using the single-pixel tracking WorldMaps offers), or to turn off the mouseover animation, or to animate from right-to-left if you wish to place the map on the right side of your page rather than the left. You can also modify the initial and hover widths of the images (keeping in mind that this may impact the sharpness of the displayed image) to suit your needs. Here's an example:
       1: <script type="text/javascript">
       2:     $("#wmContainer").jWorldMaps({
       3:         worldMapId : "YOUR-WORLDMAP-ID",
       4:         initialWidth: 250,
       5:         tracking: false,
       6:         animateTo: "left"
       7:     });
       8: </script>

share this resource :
post comment
 
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Sponsored by
Team Foundation Server Hosting
Become a Sponsor