Git Product home page Git Product logo

ribcage-google-maps's Introduction

Ribcage-Google-Maps

This library adds support for Google Maps JavaScript API v3 to Ribcage apps.

It constists of models, collections, and views that help make working with the Maps API more like working with Backbone applications.

The library is still work in progress, so please don't expect miracles.

Requirements

This library depends on Ribcage and require-async module (if used with RequireJS). Naturally, it requires the Google Maps API v3 library. It also requires DaHelpers.

Installation

Ribcage-Google-Maps modules are in UMD format. This means you can either use them with an AMD module loader such as RequireJS or with classic <script> tags. If you wish to use this library with an AMD loader, please also consult the next section.

When loading modules using the <script> tag, please make sure all.js is loaded before other modules. Also, when adding the modules using <script> tags, the UMD wrapper will do a basic dependency check and you may receive exceptions if the dependencies are not available.

Shimming the gmaps module

When using as AMD modules, you will need to adjust your RequireJS and build configuration. This is due to the way Google Maps API library is loaded, and because the API key can only be specified in the library's URL.

Please see API documentation in doc/gmaps.mkd for recommended setup. You may also substitute gmaps.js with your own version that does things differently (e.g., downloaded version of Google Maps API library, etc).

Quick example

Here's a quick example with MapDataModel and MapView:

var mapData = new MapDataModel({
    lat: 37.783333,
    long: -122.416667
});

var map = new MapView({model: mapData, el: '#map-canvas'});
map.render()

This should render a map within an element with id attribute '#map-canvas' centered on San Francisco.

API documentation

Complete API documentation is located in the doc directory. These files are Markdown files generated from the source code. Documentation for main module contains links to individual modules.

ribcage-google-maps's People

Watchers

 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.