Giter Site home page Giter Site logo

google-maps-addon's Introduction

google-maps-addon

#An Ember Addon

Google maps ember addon easy to consume.

NPM

Installation

ember install google-maps-addon --save-dev

--save-dev for adding the addon automatically into you application package.json

That's it, Google maps ember addon ready to use.

{{google-maps-addon MapOptions=mapOptions}}

We have the JSON mapOptions the powerful way to have your configurations.

mapOptions : {
  latitude : 'Your latitude',
  longitude : 'Your longitude',
  zoom : 'Your prefered zooming level',
  //Mouse events
  click : function (event){
    //I promise a callback is assured for the particular event so
    //have your code here
  },
  //markers array
  markers : [
    {
      latitude : 'Your marker latitude if empty will takes up the center latitude',
      longitude : 'Your marker longitude if empty will takes up the center longitude',
      title : 'Your title, if not provided it takes up as empty string',
      animation : 'DROP' || 'BOUNCE',
      timeout : timeout after the window loads,
      icon : 'Specify the path of the icon',
      draggable:true,
      //Mouse events
      click : function (event){
        //I promise a callback is assured for the particular event so
        //have your code here
      }
    },
    {
      latitude : 'Your marker latitude if empty will takes up the center latitude',
      longitude : 'Your marker longitude if empty will takes up the center longitude',
      title : 'Your title, if not provided it takes up as empty string',
      animation : 'DROP' || 'BOUNCE',
      timeout : timeout after the window loads,
      icon : 'Specify the path of the icon',
      draggable:true,
      //Mouse events
      click : function (event){
        //I promise a callback is assured for the particular event so
        //have your code here
      }
    }
  ],
  //infowindow will be default open.
  infowindow : {
    content : 'Your HTML content here',
    latitude : 'Your infowindow latitude if empty will takes up the center latitude',
    longitude : 'Your infowindow longitude if empty will takes up the center longitude',
    maxWidth : 'The maximum width of the infowindow' //in number
    pixelOffset : 'The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored. If an InfoWindow is opened with an anchor, the pixelOffset will be calculated from the anchors anchorPoint property. 
  }

}

Supported Mouse events

  'click',
  'dblclick',
  'drag',
  'dragend',
  'dragstart',
  'mousemove',
  'mouseout',
  'mouseover',
  'rightclick'

Feel free to raise an issue or feature request.

DEMO

google-maps-addon

Next update would be,

More info window support (events, adding it to markers)

Need more interactions back into the component than getting out of component

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

google-maps-addon's People

Contributors

ember-tomster avatar erkie avatar samvelraja avatar

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.