{"id":23156505,"url":"https://github.com/thecreation/jquery-asgmap","last_synced_at":"2025-08-26T01:08:35.908Z","repository":{"id":20783063,"uuid":"24068060","full_name":"thecreation/jquery-asGmap","owner":"thecreation","description":"A jquery plugin that used to display a google map easily.","archived":false,"fork":false,"pushed_at":"2017-09-19T11:58:32.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-16T13:05:18.995Z","etag":null,"topics":["gmaps","jquery-plugin","map"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecreation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-15T18:26:04.000Z","updated_at":"2017-02-16T17:08:39.000Z","dependencies_parsed_at":"2022-08-05T09:15:18.623Z","dependency_job_id":null,"html_url":"https://github.com/thecreation/jquery-asGmap","commit_stats":null,"previous_names":["amazingsurge/jquery-asgmap"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/thecreation/jquery-asGmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asGmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asGmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asGmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asGmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecreation","download_url":"https://codeload.github.com/thecreation/jquery-asGmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecreation%2Fjquery-asGmap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263184657,"owners_count":23427063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gmaps","jquery-plugin","map"],"created_at":"2024-12-17T21:13:50.955Z","updated_at":"2025-07-02T17:32:37.548Z","avatar_url":"https://github.com/thecreation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [jQuery asGmap](https://github.com/amazingSurge/jquery-asGmap) ![bower][bower-image] [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![prs-welcome]](#contributing)\n\n\u003e A jquery plugin that help you add google map to page.\n\n## Table of contents\n- [Main files](#main-files)\n- [Quick start](#quick-start)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Options](#options)\n- [Methods](#methods)\n- [Events](#events)\n- [No conflict](#no-conflict)\n- [Browser support](#browser-support)\n- [Contributing](#contributing)\n- [Development](#development)\n- [Changelog](#changelog)\n- [Copyright and license](#copyright-and-license)\n\n## Main files\n```\ndist/\n├── jquery-asGmap.js\n├── jquery-asGmap.es.js\n├── jquery-asGmap.min.js\n└── css/\n    ├── asGmap.css\n    └── asGmap.min.css\n```\n\n## Quick start\nSeveral quick start options are available:\n#### Download the latest build\n\n * [Development](https://raw.githubusercontent.com/amazingSurge/jquery-asGmap/master/dist/jquery-asGmap.js) - unminified\n * [Production](https://raw.githubusercontent.com/amazingSurge/jquery-asGmap/master/dist/jquery-asGmap.min.js) - minified\n\n#### Install From Bower\n```sh\nbower install jquery-asGmap --save\n```\n\n#### Install From Npm\n```sh\nnpm install jquery-asGmap --save\n```\n\n#### Install From Yarn\n```sh\nyarn add jquery-asGmap\n```\n\n#### Build From Source\nIf you want build from source:\n\n```sh\ngit clone git@github.com:amazingSurge/jquery-asGmap.git\ncd jquery-asGmap\nnpm install\nnpm install -g gulp-cli babel-cli\ngulp build\n```\n\nDone!\n\n## Requirements\n`jquery-asGmap` requires the latest version of [`jQuery`](https://jquery.com/download/).\n\n## Usage\n#### Including files:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/path/to/asGmap.css\"\u003e\n\u003cscript src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/jquery-asGmap.js\"\u003e\u003c/script\u003e\n```\n\n#### Required HTML structure\n\n```html\n\u003cdiv class=\"example\"\u003e\u003c/div\u003e\n```\n\n#### Initialization\nAll you need to do is call the plugin on the element:\n\n```javascript\njQuery(function($) {\n  $('.example').asGmap(); \n});\n```\n\n## Examples\nThere are some example usages that you can look at to get started. They can be found in the\n[examples folder](https://github.com/amazingSurge/jquery-asGmap/tree/master/examples).\n\n## Options\n`jquery-asGmap` can accept an options object to alter the way it behaves. You can see the default options by call `$.asGmap.setDefaults()`. The structure of an options object is as follows:\n\n```\n  namespace: 'gmap',\n\n  apikey: '',\n  mapType: 'ROADMAP', // ROADMAP, SATELLITE, HYBRID, TERRAIN\n\n  // map options\n  backgroundcolor: '#e5e3df', // Color used for the background of the Map div.\n  defaultui: true, // Enables/disables all default UI.\n  doubleclickzoom: false, // Enables/disables zoom and center on double click.\n  maptypecontrol: true, // The initial enabled/disabled state of the Map type control.\n  maxzoom: null, // The maximum zoom level which will be displayed on the map. If omitted, or set to null, the maximum zoom from the current map type is used instead.\n  minzoom: null, // The minimum zoom level which will be displayed on the map. If omitted, or set to null, the minimum zoom from the current map type is used instead.\n  pancontrol: false, // The enabled/disabled state of the Pan control.\n  rotatecontrol: false, // The enabled/disabled state of the Rotate control.\n  scalecontrol: false, // The initial enabled/disabled state of the Scale control.\n  scrollwheel: false, // If false, disables scrollwheel zooming on the map.\n  streetviewcontrol: false, // The initial enabled/disabled state of the Street View Pegman control.\n  styles: false, // Styles to apply to each of the default map types.\n  zoom: 3, // The initial Map zoom level\n  zoomcontrol: true, // The enabled/disabled state of the Zoom control.\n\n  controlspositions: {\n    mapType: null,\n    pan: null,\n    rotate: null,\n    scale: null,\n    streetView: null,\n    zoom: null\n  },\n\n  // position\n  latitude: null,\n  longitude: null,\n  address: '',\n\n  // markers\n  markers: [],\n  icon: {\n    url: \"http://www.google.com/mapfiles/marker.png\",\n    size: [20, 34],\n    anchor: [9, 34]\n  },\n\n  // marker\n  markercenter: true,\n  content: '',\n  popup: true,\n\n  // callback\n  onInit: null,\n  onReady: null\n```\n\n## Methods\nMethods are called on asGmap instances through the asGmap method itself.\nYou can also save the instances to variable for further use.\n\n```javascript\n// call directly\n$().asGmap('destroy');\n\n// or\nvar instance = $().data('asGmap');\ninstance.destroy();\n```\n\n#### getMap()\nGet the map api.\n```javascript\nvar map = $().asGmap('getMap');\n```\n\n#### addMarker(options)\nAdd a marker to the map.\n```javascript\n$().asGmap('addMarker', options);\n```\n\n#### addMarkers(arr)\nAdd markers to the map.\n```javascript\n$().asGmap('addMarkers', arr);\n```\n\n#### destroy()\nDestroy the gmap instance.\n```javascript\n$().asGmap('destroy');\n```\n\n## Events\n`jquery-asGmap` provides custom events for the plugin’s unique actions. \n\n```javascript\n$('.the-element').on('asGmap::ready', function (e) {\n  // on instance ready\n});\n\n```\n\nEvent   | Description\n------- | -----------\ninit    | Fires when the instance is setup for the first time.\nready   | Fires when the instance is ready for API use.\ndestroy | Fires when an instance is destroyed. \n\n## No conflict\nIf you have to use other plugin with the same namespace, just call the `$.asGmap.noConflict` method to revert to it.\n\n```html\n\u003cscript src=\"other-plugin.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery-asGmap.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  $.asGmap.noConflict();\n  // Code that uses other plugin's \"$().asGmap\" can follow here.\n\u003c/script\u003e\n```\n\n## Browser support\n\nTested on all major browsers.\n\n| \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/safari/safari_32x32.png\" alt=\"Safari\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/chrome/chrome_32x32.png\" alt=\"Chrome\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/firefox/firefox_32x32.png\" alt=\"Firefox\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/edge/edge_32x32.png\" alt=\"Edge\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/internet-explorer/internet-explorer_32x32.png\" alt=\"IE\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/opera/opera_32x32.png\" alt=\"Opera\"\u003e |\n|:--:|:--:|:--:|:--:|:--:|:--:|\n| Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | 9-11 ✓ | Latest ✓ |\n\nAs a jQuery plugin, you also need to see the [jQuery Browser Support](http://jquery.com/browser-support/).\n\n## Contributing\nAnyone and everyone is welcome to contribute. Please take a moment to\nreview the [guidelines for contributing](CONTRIBUTING.md). Make sure you're using the latest version of `jquery-asGmap` before submitting an issue. There are several ways to help out:\n\n* [Bug reports](CONTRIBUTING.md#bug-reports)\n* [Feature requests](CONTRIBUTING.md#feature-requests)\n* [Pull requests](CONTRIBUTING.md#pull-requests)\n* Write test cases for open bug issues\n* Contribute to the documentation\n\n## Development\n`jquery-asGmap` is built modularly and uses Gulp as a build system to build its distributable files. To install the necessary dependencies for the build system, please run:\n\n```sh\nnpm install -g gulp\nnpm install -g babel-cli\nnpm install\n```\n\nThen you can generate new distributable files from the sources, using:\n```\ngulp build\n```\n\nMore gulp tasks can be found [here](CONTRIBUTING.md#available-tasks).\n\n## Changelog\nTo see the list of recent changes, see [Releases section](https://github.com/amazingSurge/jquery-asGmap/releases).\n\n## Copyright and license\nCopyright (C) 2016 amazingSurge.\n\nLicensed under [the LGPL license](LICENSE).\n\n[⬆ back to top](#table-of-contents)\n\n[bower-image]: https://img.shields.io/bower/v/jquery-asGmap.svg?style=flat\n[bower-link]: https://david-dm.org/amazingSurge/jquery-asGmap/dev-status.svg\n[npm-image]: https://badge.fury.io/js/jquery-asGmap.svg?style=flat\n[npm-url]: https://npmjs.org/package/jquery-asGmap\n[license]: https://img.shields.io/npm/l/jquery-asGmap.svg?style=flat\n[prs-welcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[daviddm-image]: https://david-dm.org/amazingSurge/jquery-asGmap.svg?style=flat\n[daviddm-url]: https://david-dm.org/amazingSurge/jquery-asGmap\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-asgmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecreation%2Fjquery-asgmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecreation%2Fjquery-asgmap/lists"}