Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#1186] Added documentation for onmaploaded option for the googlemaps…

… plugin. Also fixed issue where maruku was complaining about unescaped underscores in the smart documentation
  • Loading branch information...
commit 0b2a9e49f22ef56bb1cf7bc38ac567e675859eea 1 parent 75aa78f
@dseif dseif authored
View
2  players/_posts/2012-12-12-smart.md
@@ -7,7 +7,7 @@ title: smart
The Smart player allows the use of any existing player without specifying which player.
-The idea is that Smart will try to find an acceptable player, given the id and url. Smart requires players to implement a _canPlayType( containerType, url ) function, along side _setup. This function returns true or false if the player can play this, given the container and url. A player that does not implement a _canPlayType will return undefined, which is inconclusive if the player can play it or not. Each player also exposes a canPlayType( container, url ) function that developer can use to query if their data can be played or not.
+The idea is that Smart will try to find an acceptable player, given the id and url. Smart requires players to implement a \_canPlayType( containerType, url ) function, along side \_setup. This function returns true or false if the player can play this, given the container and url. A player that does not implement a \_canPlayType will return undefined, which is inconclusive if the player can play it or not. Each player also exposes a canPlayType( container, url ) function that developer can use to query if their data can be played or not.
Smart will also work with video elements, and attempt to create an HTML5 video experience if possible. In this case, the container can be a video element or a div. If it is a div, a video element will be created and appended to the supplied div.
View
15 plugins/_posts/2012-12-12-googlemaps.md
@@ -19,6 +19,7 @@ Adds a map to the target div centered on the location specified by the user.
* **lat** \[Number\] - The Latitude that the map should be centered on.
* **lng** \[Number\] - The Lopngitude hat the map should be centered on. (NOTE: Lat and Lng bust be specified if no Location is provided.)
* **location** \[String\] - An address/location to center the map on. Must be present if lat and lng are not specified.
+* **onmaploaded** \[Function, optional\] - A callback function that gets fired once the map has loaded. The callback function also receives the options object as well as a reference to the map object.
*Note:* using location requires extra loading time, also not specifying both lat/lng and location will
cause and error.
@@ -46,3 +47,17 @@ Tweening animates a streetview from one location to another.
lng: -79.403323
});
{% endhighlight %}
+
+{% highlight js linenos %}
+ var p = Popcorn( "#video" ).googlemap({
+ start: 1,
+ end: 5,
+ type: "STREETVIEW",
+ target: "map2",
+ location: "Toronto, Ontario, Canada",
+ onmaploaded: function( options, map ) {
+ // map is a reference to the actual map object
+ // options is the options object that was passed in initially
+ }
+ });
+{% endhighlight %}
Please sign in to comment.
Something went wrong with that request. Please try again.