0

Id like to know all the methods and properties of something like GoogleMapReact I tried the following:

import GoogleMapReact from 'google-map-react'
console.log(GoogleMapReact);

But it returns this really giant, dirty one-line string thats hard to read.

Embedded_Mugs
  • 2,132
  • 3
  • 21
  • 33

1 Answers1

1

Is not efficient use console.log().

You can do multiple options:

  1. You can press (Command on Mac / Ctrl on Windows) and click in GoogleMapReact import, its gonna open the library file. You can find all the methods.

  2. The best way for me: consult the documentation. You are looking for Google-map-react. API references has all the methods: https://github.com/google-map-react/google-map-react/blob/master/API.md

  • The thing is, I don't think the documentation is complete. So there exists methods in that library that aren't in the documentation. command-clicking on the library opens up the same giant index.js file which isn't a great way of listing all the members of a library. – Embedded_Mugs Jul 20 '21 at 17:15
  • Yes, I understand you. This depend individually per library. I used in the past this library and I can tell you all the methods are in the documentation. Maybe if you wanna do something can you tell me. I can support you wit the methods. – Amstrong Monachello Jul 20 '21 at 17:23
  • Thanks for your response, I'm trying to implement a zoom and center on multiple markers like this: https://stackoverflow.com/questions/19304574/center-set-zoom-of-map-to-cover-all-visible-markers However, I see no documentation for ```.LatLngBounds();``` and ```bounds.extend()``` which the top answerer is using. – Embedded_Mugs Jul 20 '21 at 17:42