{"id":15383637,"url":"https://github.com/knownasilya/google-maps-markup","last_synced_at":"2025-04-15T11:54:27.339Z","repository":{"id":35256615,"uuid":"39516487","full_name":"knownasilya/google-maps-markup","owner":"knownasilya","description":"Ember markup component for Google Maps - Draw and Measure","archived":false,"fork":false,"pushed_at":"2024-01-09T17:30:12.000Z","size":4746,"stargazers_count":12,"open_issues_count":26,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T19:45:18.566Z","etag":null,"topics":["demo","draw","ember-addon","google-maps","google-maps-markup","map","markup","web-component"],"latest_commit_sha":null,"homepage":"https://google-maps-markup.netlify.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knownasilya.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-22T16:14:28.000Z","updated_at":"2022-01-14T15:41:41.000Z","dependencies_parsed_at":"2024-10-18T16:49:43.202Z","dependency_job_id":null,"html_url":"https://github.com/knownasilya/google-maps-markup","commit_stats":{"total_commits":418,"total_committers":8,"mean_commits":52.25,"dds":"0.26315789473684215","last_synced_commit":"27861c2eebe34bb73e91ce4ff45657576ac5d2d1"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Fgoogle-maps-markup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Fgoogle-maps-markup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Fgoogle-maps-markup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knownasilya%2Fgoogle-maps-markup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knownasilya","download_url":"https://codeload.github.com/knownasilya/google-maps-markup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248812992,"owners_count":21165519,"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":["demo","draw","ember-addon","google-maps","google-maps-markup","map","markup","web-component"],"created_at":"2024-10-01T14:39:03.308Z","updated_at":"2025-04-15T11:54:27.323Z","avatar_url":"https://github.com/knownasilya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-maps-markup\n\nDrawing and measurement tools for a Google Map\n\n[![npm version](https://badge.fury.io/js/google-maps-markup.svg)](http://badge.fury.io/js/google-maps-markup)\n[![Build Status](https://travis-ci.org/knownasilya/google-maps-markup.svg)](https://travis-ci.org/knownasilya/google-maps-markup)\n[![Coverage Status](https://coveralls.io/repos/knownasilya/google-maps-markup/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/knownasilya/google-maps-markup?branch=master)\n[![Ember Observer Score](http://emberobserver.com/badges/google-maps-markup.svg)](http://emberobserver.com/addons/google-maps-markup)\n\n[Preview Demo]\n\n## Compatibility\n* Ember.js v3.16 or above\n* Ember CLI v2.13 or above\n* Node.js v10 or above\n\n## Usage\n\n```bash\nember install google-maps-markup\n```\n\n```hbs\n\u003cGoogleMapsMarkup @map={{this.map}} /\u003e\n```\n\n### Available Attributes\n\n- `map` - **REQUIRED**; Google Map instance, defaults to `undefined`. Bring your own map!\n- `editable` - (experimental) Allow shapes to be edited. Defaults to `false`.\n- `panForOffscreen` - On hover pan to shape if not in view (reset to last bounds after). Defaults to `true`.\n- `autoResetToPan` - After drawing a shape the tool changes to \"Pan\" instead of staying on the current tool. Defaults to `false`.\n\n#### Actions\n\n- `afterAddFeature` - Fires after finishing some markup on the map. Passes the result as the first argument, i.e. `afterAddFeature(result) {}`.\n- `afterClearResults` - Fires after clicking \"Clear\" for a mode. Passes the mode as the first argument, i.e `afterClearResults(mode) {}`.\n\n### Service\n\nThe service is called `markupData` and allows access to the result data that gets created when you\ncreate markup on the map. It also has some helper functions.\n\n```js\nimport Component from '@glimmer/component';\n\nexport default class MyComponent extends Component {\n  @service('markup-data')\n  markupDataService;\n}\n```\n\n#### Properties\n\n- `layers` - Array of Google Maps Data layers, one for draw and one for measure.\n- `results` - Markup data for each markup you create, based on mode. See `markupResults` for all results.\n- `markupResults` - The object of all the results, no matter the mode.\n- `mode` - The drawing mode, either 'draw' or 'measure'.\n\n#### Methods\n\n- `activate` - Add all layers to the map. `activate(map)`.\n- `changeModeByResults` - Changes the mode to the first layer with results.\n- `featureToResult` - Converts a Google Maps Data Feature to a markup result, for loading data without\n  actually drawing on the map (ie, load via url). `featureToResult(feature, layer)`.\n\n## Installation\n\n- `git clone` this repository\n- `yarn`\n\n### Linting\n\n- `npm run lint:js`\n- `npm run lint:js -- --fix`\n\n### Running tests\n\n- `ember test` – Runs the test suite on the current Ember version\n- `ember test --server` – Runs the test suite in \"watch mode\"\n- `ember try:each` – Runs the test suite against multiple Ember versions\n\n### Running the dummy application\n\n- `ember serve`\n- Visit the dummy application at [http://localhost:4200](http://localhost:4200).\n\nFor developing locally with your app, you can use `DEVELOPING=true npm start` for your app, and\n`npm link path/to/this/addon` and your app will automatically rebuild as you make changes to your\nlocal version of this addon.\n\nFor more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).\n\n## Github Pages/Demo\n\nBuild by checking out the relevant branch, since the test dummy app\nis actually the demo app.\n\nRun the following command:\n\n```no-highlight\nember github-pages:commit --message \u003cmessage describing demo release\u003e\n```\n\nFor more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n\n[preview demo]: http://knownasilya.github.io/google-maps-markup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknownasilya%2Fgoogle-maps-markup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknownasilya%2Fgoogle-maps-markup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknownasilya%2Fgoogle-maps-markup/lists"}