Code Monkey home page Code Monkey logo

af-maps's Introduction

Google Maps plugin using App Framework

###Author: Ian Maffett

This plugin helps you create a google maps object on your page. You can include the google maps script tag, or we can create it asyncronously.

<script src="http://maps.google.com/maps/api/js?sensor=true"></script>

Using

To use this, call .gmaps on an App Framework collection and pass in options from the google maps API. If you have not included the google maps script tag from above, we will add it for you. https://developers.google.com/maps/documentation/javascript/

$(document).ready(function(){
   $("#maps").gmaps({options});
});

#Retreiving the Google maps object

To get a google maps object that you can interact with, call the gmaps function with no parameters. You must create the map before hand.

var myMap=$("#maps").gmaps();

#Triggering a resize command

To trigger a resize command

$("#maps").gmaps('resize');

#Using in App Framework UI

If you are using this in UI, you need to trigger a resize when the panel is loaded.

<div id="maps" title="Maps" class="panel" data-load="resizeMap">

</div>
function resizeMap(){
    $("#maps").gmaps("resize");
}

Bugs

Please use github to report any bugs found. Please provide the following

  1. Any error messages from the console

  2. Line numbers of offending code

  3. Test cases

  4. Description of the Error

  5. Expected result

  6. Browser/Device you are testing on

License

This plugin is licensed under the terms of the MIT License, see the included license.txt file.

af-maps's People

Watchers

James Cloos avatar Trevor S. Brown, PhD 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.