| 1 | # jQuery Geo |
| 2 | |
| 3 | After years of internal development, we are pleased to bring our JavaScript map widget and spatial analysis tools to the open-source world in the form of a jQuery plugin. |
| 4 | |
| 5 | ## Getting Started |
| 6 | Using jQuery Geo requires, at a minimum, adding one element, including one script (apart from jQuery itself, version 1.9 or higher), and calling one function. |
| 7 | |
| 8 | You can also get the library through JSPM and NPM. |
| 9 | |
| 10 | ### Load via jspm |
| 11 | |
| 12 | $ npm install jspm --save-dev |
| 13 | $ jspm init |
| 14 | $ jspm install jquery |
| 15 | $ jspm install npm:jquery.geo |
| 16 | |
| 17 | ```js |
| 18 | // lib/main.js |
| 19 | import $ from 'jquery'; |
| 20 | import geomap from 'jquery.geo'; |
| 21 | |
| 22 | $( '#map' ).geomap( ); |
| 23 | ``` |
| 24 | |
| 25 | ### Download via npm |
| 26 | |
| 27 | $ npm install jquery --save-dev |
| 28 | $ npm install jquery.geo --save-dev |
| 29 | |
| 30 | ```html |
| 31 | <div id="map" style="height: 480px;"></div> |
| 32 | <script src="node_modules/jquery/dist/jquery.min.js"></script> |
| 33 | <script src="node_modules/jquery.geo/dist/jquery.geo.min.js"></script> |
| 34 | <script> |
| 35 | $(function() { |
| 36 | $( "#map" ).geomap( ); |
| 37 | }); |
| 38 | </script> |
| 39 | ``` |
| 40 | |
| 41 | ### Load via CDN script |
| 42 | |
| 43 | The following copy-and-paste snippet will help you get started. |
| 44 | |
| 45 | ```html |
| 46 | <div id="map" style="height: 480px;"></div> |
| 47 | <script src="http://code.jquery.com/jquery-3.3.1.min.js"></script> |
| 48 | <script src="http://code.jquerygeo.com/jquery.geo-1.1.0.min.js"></script> |
| 49 | <script> |
| 50 | $(function() { |
| 51 | $( "#map" ).geomap( ); |
| 52 | }); |
| 53 | </script> |
| 54 | ``` |
| 55 | |
| 56 | ### Download direct |
| 57 | |
| 58 | You can also download the latest release as a [minified JavaScript file][min] or a [full, uncompressed one][max]. |
| 59 | |
| 60 | [min]: http://code.jquerygeo.com/jquery.geo-1.1.0.min.js |
| 61 | [max]: http://code.jquerygeo.com/jquery.geo-1.1.0.js |
| 62 | |
| 63 | ## Documentation |
| 64 | |
| 65 | The latest docs are hosted at: http://docs.jquerygeo.com |
| 66 | |
| 67 | Release and other announcements via @geomappin on Twitter: https://twitter.com/geomappin |
| 68 | |
| 69 | News, dev updates, & personal tweets via @ryanttb on Twitter: https://twitter.com/ryanttb |
| 70 | |
| 71 | ## Contributing |
| 72 | |
| 73 | To contribute to the project, please read and follow the [CONTRIBUTING guide](CONTRIBUTING.md). |
| 74 | |
| 75 | ## License |
| 76 | Copyright (c) 2016 Ryan Morrison-Westphal |
| 77 | Licensed under the MIT license |