GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zoom Props causing typescript errors · Issue #511 · fullstackreact/google-maps-react

zoom Props causing typescript errors #511

New issue
Copy link
New issue
Copy link
Open
Open
zoom Props causing typescript errors#511
Copy link

Description

@dahfool
dahfool
opened on Apr 27, 2021
Issue body actions

I am getting the following typescript error

TS2769: No overload matches this call.   Overload 1 of 2, '(props: IMapProps | Readonly<IMapProps>): Map', gave the following error.     Type '{ google: any; zoom: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Map> & Readonly<IMapProps> & Readonly<{ children?: ReactNode; }>'.       Property 'zoom' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Map> & Readonly<IMapProps> & Readonly<{ children?: ReactNode; }>'.   Overload 2 of 2, '(props: IMapProps, context: any): Map', gave the following error.     Type '{ google: any; zoom: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Map> & Readonly<IMapProps> & Readonly<{ children?: ReactNode; }>'.       Property 'zoom' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Map> & Readonly<IMapProps> & Readonly<{ children?: ReactNode;

The code

import { Map, GoogleApiWrapper, GoogleAPI } from 'google-maps-react'

export class MapContainer extends Component<GoogleAPI> {
  render() {
    if (!this.props.google) {
      return <div>Loading...</div>
    }

    return (
      <div
        style={{
          position: 'relative',
          height: 400,
        }}
      >
        <Map google={this.props.google} zoom={1} />
      </div>
    )
  }
}
export default GoogleApiWrapper({
  apiKey: '',
})(MapContainer)````

Activity

  1. dahfool
    closed this as completedon Apr 27, 2021
  2. dahfool
    reopened this on Apr 27, 2021
  3. dahfool commented on Apr 27, 2021

    @dahfool
    dahfool
    on Apr 27, 2021
    Author
    More actions

    using:
    "@types/google-maps-react": "^2.0.5",
    "google-maps-react": "^2.0.6",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.