How to use the react-google-maps.withGoogleMap function in react-google-maps

To help you get started, we’ve selected a few react-google-maps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tubackkhoa / tkframework / client / ui / backend / containers / ServicePoint / Form / edit.jsx View on Github external
import { getServicePoint, updateServicePoint, replaceServicePoint } from 'store/actions/service-point'

import * as authSelectors from 'store/selectors/auth'
import * as servicePointSelectors from 'store/selectors/service-point'

import { GOOGLE_API_KEY } from 'store/constants/api'


import { 
  renderTextField, 
  renderDropzoneImage, 
  renderAutoComplete,
} from 'ui/backend/shared/utils'


const ServicePointGoogleMap = withGoogleMap(({position}) => (
      
    
))

const validate = (values) => {
  const errors = {}
  // first time it is empty
  if(!values) return errors
  if (!values.name) {
github benawad / fullstack-graphql-airbnb-clone / packages / web / src / modules / shared / LocationField.tsx View on Github external
import * as React from "react";
import { FieldProps } from "formik";
import Geosuggest, { Suggest } from "react-geosuggest";
import { withGoogleMap, GoogleMap, Marker } from "react-google-maps";

import "./geo.css";

interface DefaultCenter {
  lat: number;
  lng: number;
}

// -34.397, lng: 150.644
const MapWithAMarker = withGoogleMap<{
  defaultCenter: DefaultCenter;
  lat: number;
  lng: number;
  onClick: (e: google.maps.KmlMouseEvent | google.maps.MouseEvent) => void;
}>(props => (
  
    
));

interface State {
  defaultCenter: DefaultCenter | null;
github flatlogic / react-material-admin / src / pages / maps / Maps.js View on Github external
import React from "react";
import {
  withGoogleMap,
  withScriptjs,
  GoogleMap,
  Marker,
} from "react-google-maps";

// styles
import useStyles from "./styles";

const BasicMap = withScriptjs(
  withGoogleMap(() => (
    
      
  )),
);

export default function Maps() {
  var classes = useStyles();

  return (
github imranhsayed / google-maps-in-react / client / src / components / Map.js View on Github external
render(){
		const AsyncMap = withScriptjs(
			withGoogleMap(
				props => (
					
						{/* InfoWindow on top of marker */}
						
							<div>
								<span style="{{">{ this.state.address }</span>
							</div>
						
						{/*Marker*/}
github maximevaillancourt / trace / src / pages / View.js View on Github external
// used to display a line between the various versions' position markers
    const polylineJSX = (
github ninjadotorg / handshake-app / src / components / handshakes / exchange / Create / components / RelocationMap / index.js View on Github external
render() {
    const Map = withScriptjs(withGoogleMap(RelocationMap));
    return (
      <div>
        <map style="{{">}
          containerElement={<div style="{{">}
          mapElement={<div style="{{">}
          {...this.props}
        /&gt;
        <img alt="marker" height="{30}" width="{30}" src="{currentLocationIndicator}">
      </div>
    );
  }
}</div></map></div>
github codeforkansascity / Neighborhood-Dashboard / app / js / components / map.js View on Github external
import React from 'react'
import { render } from 'react-dom'
import { withGoogleMap, GoogleMap, Polygon, InfoWindow, Marker } from 'react-google-maps'
import axios from 'axios'
import { uploadMapContext } from '../actions'

import LegendContainer from '../containers/legend_container'

const MyApp = withGoogleMap(props =&gt; {
  return(
    <div>
      
        
        {props.markers.map((marker, index) =&gt; (
          </div>
github kristjanmik / kjosturett-web / src / routes / kjorskra / Kjorskra.js View on Github external
import busData from './bus.json';
import Autocomplete from './Autocomplete';
import OpeningHours from './OpeningHours';
import history from '../../history';

import { clean as cleanKennitala, isPerson } from 'kennitala';

import {
  withScriptjs,
  withGoogleMap,
  GoogleMap,
  Marker,
  InfoWindow
} from 'react-google-maps';

const Map = withGoogleMap(({ mapOptions, kjorstadur }) =&gt; {
  return (
    
      
    
  );
});

const getItineryInfo = ({ duration, distance, type, from, to }) =&gt; {
  return {
    walking: {
github mhansen / nzwirelessmap / site2 / src / App.js View on Github external
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import AppBar from 'material-ui/AppBar'
import Dialog from 'material-ui/Dialog'
import AutoComplete from 'material-ui/AutoComplete'
import MenuItem from 'material-ui/MenuItem'
import IconButton from 'material-ui/IconButton'
import FontIcon from 'material-ui/FontIcon'

import {withGoogleMap, GoogleMap, FusionTablesLayer} from 'react-google-maps';
import 'whatwg-fetch'

import About from './About'
import './App.css';

const SimpleExampleGoogleMap = withGoogleMap(props =&gt; (
  
    
  
));
github creativetimofficial / material-dashboard-react / src / views / Maps / Maps.jsx View on Github external
import React from "react";
import {
  withScriptjs,
  withGoogleMap,
  GoogleMap,
  Marker
} from "react-google-maps";

const CustomSkinMap = withScriptjs(
  withGoogleMap(() =&gt; (

react-google-maps

React.js Google Maps integration component

MIT
Latest version published 7 years ago

Package Health Score

55 / 100
Full package analysis