Skip to content

imaffett/af-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Google maps plugin for App Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published