diff --git a/examples/gh-pages/scripts/ReactRoot.js b/examples/gh-pages/scripts/ReactRoot.js index c5786428..f92ae500 100644 --- a/examples/gh-pages/scripts/ReactRoot.js +++ b/examples/gh-pages/scripts/ReactRoot.js @@ -66,7 +66,7 @@ const DROPDOWN_ACTIONS = [ false, { key: "events__simple-click-event", - displayName: "Smple click event", + displayName: "Simple click event", path: "#events/simple-click-event", component: { componentClass: require("./components/events/SimpleClickEvent"), @@ -108,6 +108,18 @@ const DROPDOWN_ACTIONS = [ }, }, }, + false, + { + key: "drawing__drawing-tools", + displayName: "Drawing Tools", + path: "#drawing/drawing-tools", + component: { + componentClass: require("./components/drawing/DrawingTools"), + componentRaw: { + __raw: require("!raw-loader!./components/drawing/DrawingTools"), + }, + }, + }, ]; const RIGHT_ACTIONS = [ diff --git a/examples/gh-pages/scripts/components/drawing/DrawingTools.js b/examples/gh-pages/scripts/components/drawing/DrawingTools.js new file mode 100644 index 00000000..1d5814c0 --- /dev/null +++ b/examples/gh-pages/scripts/components/drawing/DrawingTools.js @@ -0,0 +1,63 @@ +import React from "react/addons"; +import {GoogleMaps, DrawingManager} from "react-google-maps"; + +/* + * https://developers.google.com/maps/documentation/javascript/examples/drawing-tools + * + * Note: requires the Google Maps drawing API library in your script src + */ +class DrawingTools extends React.Component { + + constructor (...args) { + super(...args); + this.state = { + zoom: 8, + center: new google.maps.LatLng(-34.397, 150.644), + }; + } + + render () { + const {props, state} = this, + {googleMapsApi, ...otherProps} = props; + + return ( + + + + + + ); + } + +} + +export default DrawingTools; diff --git a/examples/gh-pages/scripts/html.js b/examples/gh-pages/scripts/html.js index 69c098e4..c75dfe99 100644 --- a/examples/gh-pages/scripts/html.js +++ b/examples/gh-pages/scripts/html.js @@ -22,7 +22,7 @@ class ReactHtml extends React.Component { React Google Maps | tomchentw {this._render_link_to_stylesheet_(clientAssets)} -