Giter Site home page Giter Site logo

gusano / ember-google-maps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sandydoo/ember-google-maps

0.0 3.0 0.0 726 KB

A lightweight, declarative, composable API for building ambitious map UIs in your Ember apps.

Home Page: https://ember-google-maps.sandydoo.me

License: MIT License

JavaScript 64.02% HTML 31.43% CSS 4.53% Shell 0.02%

ember-google-maps's Introduction

Build Status

๐Ÿ“ Ember Google Maps

A lightweight, declarative, composable API for building ambitious map UIs in your Ember apps.

What this addon is:
  • โœ… A lightweight Ember API for working with Google Maps.
  • โœ… An on-demand, asynchronous loader for the Google Maps API.
What this addon is not:
  • โŒ A bulky, verbose wrapper that reimplements the entire Google Maps API.
  • โŒ A whitelist or option validator that is tightly coupled to Google's API.

๐Ÿ“Ž Documentation

๐Ÿ‘ทโ€ Maintainers

This addon is maintained by Sander Melnikov.

โญ Features

Feature
Lightweight wrapper โœ…
Async API loading โœ…
Official Google API โœ…
Leverages templates โœ…
Contextual components โœ…
Minimal observer usage โœ…
Native Ember HTML markers โœ…

If you don't need the Google API specifically, check out ember-leaflet.

Examples of what to expect

Display a map centered around a set of coordinates ๐Ÿ—บ.

{{g-map lat='51.508530' lng='-0.076132' zoom=10}}

Display an array of locations using markers ๐Ÿ“.

{{#g-map lat='51.508530' lng='-0.076132' zoom=10 as |g|}}
  {{#each locations as |l|}}
    {{g.marker lat=l.lat lng=l.lng onClick=(action 'showDetails' l)}}
  {{/each}}
{{/g-map}}

Display a custom overlay, like a custom HTML marker using template blocks ๐Ÿ˜ฑ. This lets you do all sorts of fancy things, like adding CSS animations and binding data.

{{#g-map lat='51.508530' lng='-0.076132' zoom=10 as |g|}}
  {{#each rentals as |r|}}
    {{#g.overlay lat=r.lat lng=r.lng classNames='custom-marker'}}
      <div class="marker-content">
        <p class="price">{{r.price}}</p>
      </div>
    {{/g.overlay}}
  {{/each}}
{{/g-map}}

Contributing

Installation

  • git clone https://github.com/sandydoo/ember-google-maps.git this repository
  • cd ember-google-maps
  • yarn

Linting

  • yarn lint:js
  • yarn lint:js --fix

Setting up API keys

The dummy app and test suite is run using a live map instance, which means you need an API key. I do not provide API keys for testing โ€“ you need to generate your own.

You can create an API key by following the instructions here: Create API key.

Assign this key to the GOOGLE_MAPS_API_KEY variable in .env or just run these lines, making sure to replace INSERT_YOUR_KEY_HERE with your actual key.

touch .env & echo 'GOOGLE_MAPS_API_KEY=<INSERT_YOUR_KEY_HERE>' > .env cp .env .env.test

Running tests

  • ember test โ€“ Runs the test suite on the current Ember version
  • ember test --server โ€“ Runs the test suite in "watch mode"
  • ember try:each โ€“ Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

MIT ยฉ Sander Melnikov.

ember-google-maps's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.