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' not listed as a valid propType in the index.ts file · Issue #443 · fullstackreact/google-maps-react

'zoom' not listed as a valid propType in the index.ts file #443

New issue
Copy link
New issue
Copy link
Open
#466
#445
Open
'zoom' not listed as a valid propType in the index.ts file#443
#466
#445
Copy link

Description

@nzayatz14
nzayatz14
opened on May 19, 2020
Issue body actions

You have several examples using the zoom prop to set the zoom level of the map, but this prop is not listed in the IMapProps definition in the index.ts file, making it unusable for typescript projects.

Current value:

export interface IMapProps extends google.maps.MapOptions {
  google: GoogleAPI
  loaded?: boolean

  style?: Style
  containerStyle?: Style

  bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral
  centerAroundCurrentLocation?: boolean
  initialCenter?: google.maps.LatLngLiteral
  center?: google.maps.LatLngLiteral

  visible?: boolean

  onReady?: mapEventHandler
  onClick?: mapEventHandler
  onDragend?: mapEventHandler
  onRecenter?: mapEventHandler
  onBoundsChanged?: mapEventHandler
  onCenterChanged?: mapEventHandler
  onDblclick?: mapEventHandler
  onDragstart?: mapEventHandler
  onHeadingChange?: mapEventHandler
  onIdle?: mapEventHandler
  onMaptypeidChanged?: mapEventHandler
  onMousemove?: mapEventHandler
  onMouseover?: mapEventHandler
  onMouseout?: mapEventHandler
  onProjectionChanged?: mapEventHandler
  onResize?: mapEventHandler
  onRightclick?: mapEventHandler
  onTilesloaded?: mapEventHandler
  onTiltChanged?: mapEventHandler
  onZoomChanged?: mapEventHandler
}
Reacted by Marin Andros, Diogo Poeira, Giorgi, Aaron B and Nicolas Justiniano

Activity

  1. mandros1 commented on May 20, 2020

    @mandros1
    mandros1
    on May 20, 2020
    More actions

    +1 I also noticed this, which is weird since it is so boldly simple in the readme, but I did read somewhere in their readme that the bounds property should set the zoom as well (which makes sense) but I still haven't been able to get it to do anything, the original code of it is below

    var points = [
      { lat: 42.02, lng: -77.01 },
      { lat: 42.03, lng: -77.02 },
      { lat: 41.03, lng: -77.04 },
      { lat: 42.05, lng: -77.02 }
    ]
    const bounds = new this.props.google.maps.LatLngBounds()
    
    for (var i = 0; i < points.length; i++) {
      bounds.extend(points[i]);
    }
    
    return (
      <Map 
        google={this.props.google}
        style={containerStyle}
        initialCenter={{
            lat: 42.39,
            lng: -72.52
        }}
        bounds={bounds}
      >)
    
  2. luiscassih commented on May 25, 2020

    @luiscassih
    luiscassih
    on May 25, 2020
    More actions

    Adding the @types/googlemaps package solved the zoom issue with typescript but now I've facing another ts compiler error with TS7006: Parameter 'event' implicitly has an 'any' type. on ./node_modules/google-maps-react/index.d.ts:27:70
    Makes this package unusable for me on typescript

    Reacted by Aaron B
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 01402503 — 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.