Skip to content

Commit

Permalink
docs(examples): add comments for loading maps.googleapis script
Browse files Browse the repository at this point in the history
* Closes #81 and thanks to @taydakov
  • Loading branch information
tomchentw committed Aug 7, 2015
1 parent 6335c9e commit 15a228b
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/gh-pages/scripts/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ import {default as ReactRoot} from "./ReactRoot";

require("../styles/index.scss");

/*
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
React.render(<ReactRoot />, document.getElementById("react-container"));
4 changes: 4 additions & 0 deletions examples/gh-pages/scripts/components/GeojsonToComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ function geometryToComponentWithLatLng (geometry) {
}
}

/*
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class GeojsonToComponents extends Component {

constructor (...args) {
Expand Down
2 changes: 2 additions & 0 deletions examples/gh-pages/scripts/components/GettingStarted.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const {update} = addons;
/*
* This is the modify version of:
* https://developers.google.com/maps/documentation/javascript/examples/event-arguments
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class GettingStarted extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {default as GoogleMap} from "../../../../../src/GoogleMap";

/*
* https://developers.google.com/maps/documentation/javascript/examples/map-simple-async
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class AsynchronousLoading extends Component {

Expand Down
3 changes: 3 additions & 0 deletions examples/gh-pages/scripts/components/basics/Directions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {default as React, Component} from "react";
import {default as GoogleMap} from "../../../../../src/GoogleMap";
import {default as DirectionsRenderer} from "../../../../../src/DirectionsRenderer";

/*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class Directions extends Component {

state = {
Expand Down
2 changes: 2 additions & 0 deletions examples/gh-pages/scripts/components/basics/Geolocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const geolocation = (

/*
* https://developers.google.com/maps/documentation/javascript/examples/map-geolocation
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class Geolocation extends Component {

Expand Down
3 changes: 3 additions & 0 deletions examples/gh-pages/scripts/components/basics/OverlayView.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const STYLES = {
}
};

/*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class OverlayViewExample extends Component {
state = {
count: 0,
Expand Down
2 changes: 2 additions & 0 deletions examples/gh-pages/scripts/components/basics/SimpleMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {default as React, Component} from "react";
import {default as GoogleMap} from "../../../../../src/GoogleMap";
/*
* Sample From: https://developers.google.com/maps/documentation/javascript/examples/map-simple
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class SimpleMap extends Component {
/*
Expand Down
3 changes: 3 additions & 0 deletions examples/gh-pages/scripts/components/basics/StyledMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {default as React, Component} from "react";
import {default as GoogleMap} from "../../../../../src/GoogleMap";
import {default as InfoBox} from "../../../../../src/addons/InfoBox";

/*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class StyledMap extends Component {

static defaultProps = {
Expand Down
2 changes: 2 additions & 0 deletions examples/gh-pages/scripts/components/drawing/DrawingTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {default as DrawingManager} from "../../../../../src/DrawingManager";
*
* Note: requires the Google Maps drawing API library in your script src
*
* Add <script src="https://maps.googleapis.com/maps/api/js?libraries=drawing"></script> to your HTML to provide google.maps reference
*
* Credits: thanks @idolize for the contribution!
*/
export default class DrawingTools extends Component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {default as Marker} from "../../../../../src/Marker";

/*
* https://developers.google.com/maps/documentation/javascript/examples/event-arguments
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class AccessingArguments extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {default as InfoWindow} from "../../../../../src/InfoWindow";

/*
* https://developers.google.com/maps/documentation/javascript/examples/event-closure
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class ClosureListeners extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {default as InfoWindow} from "../../../../../src/InfoWindow";

/*
* https://developers.google.com/maps/documentation/javascript/examples/event-properties
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class GettingProperties extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {default as Marker} from "../../../../../src/Marker";

/*
* https://developers.google.com/maps/documentation/javascript/examples/event-simple
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class SimpleClickEvent extends Component {

Expand Down
2 changes: 2 additions & 0 deletions examples/simplemap/scripts/SimpleMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const {update} = addons;
/*
* This is the modify version of:
* https://developers.google.com/maps/documentation/javascript/examples/event-arguments
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.maps reference
*/
export default class SimpleMap extends Component {

Expand Down

0 comments on commit 15a228b

Please sign in to comment.