UNPKG

@syncromatics/react-google-maps

Version:
40 lines (36 loc) 924 B
### Map with a FusionTablesLayer ```jsx const { compose, withProps } = require("recompose"); const { withScriptjs, withGoogleMap, GoogleMap, FusionTablesLayer, } = require("@syncromatics/react-google-maps"); const MapWithAFusionTablesLayer = compose( withProps({ googleMapURL: GOOGLE_MAP_URL, loadingElement: <div style={{ height: `100%` }} />, containerElement: <div style={{ height: `400px` }} />, mapElement: <div style={{ height: `100%` }} />, }), withScriptjs, withGoogleMap )(props => <GoogleMap defaultZoom={11} defaultCenter={{ lat: 41.850033, lng: -87.6500523 }} > <FusionTablesLayer url="http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml" options={{ query: { select: `Geocodable address`, from: `1mZ53Z70NsChnBMm-qEYmSDOvLXgrreLTkQUvvg` } }} /> </GoogleMap> ); <MapWithAFusionTablesLayer /> ```