How to use the google-map-react.PropTypes function in google-map-react

To help you get started, we’ve selected a few google-map-react 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 robeio / robe-react-ui / src / googlemap / GoogleMap.jsx View on Github external
import React from "react";
import PropTypes from "prop-types";
import { ShallowComponent, Application } from "robe-react-commons";
import Googlemap from "google-map-react";
import SearchBox from "./SearchBox";
import Col from "react-bootstrap/lib/Col";
import "./GoogleMap.css";

export default class GoogleMap extends ShallowComponent {

    static propTypes: Map = {
        ...Googlemap.PropTypes,
        searchBox: PropTypes.object
    };

    static defaultProps = {
        ...Googlemap.defaultProps,
        language: Application.i18n(GoogleMap, "googlemap.GoogleMap", "language")
    };

    render(): Object {
        let newProps = { ...this.props };
        if (!newProps.bootstrapURLKeys.language) {
            newProps.bootstrapURLKeys.language = this.props.language;
        }
        return (<span>
            {this.__renderSearchBox()}
            </span>

google-map-react

Isomorphic component that allows rendering react components on a google map

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis