Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restricting Map Bound #1078

Open
GeFeSTTS opened this issue Oct 22, 2021 · 1 comment
Open

Restricting Map Bound #1078

GeFeSTTS opened this issue Oct 22, 2021 · 1 comment

Comments

@GeFeSTTS
Copy link

GeFeSTTS commented Oct 22, 2021

Is it possible to set restrict map bound (https://developers.google.com/maps/documentation/javascript/examples/control-bounds-restriction#maps_control_bounds_restriction-javascript) in this library? I tried different ways to block removal from center, but it doesn't work.

const GoogleMaps = withScriptjs(
  withGoogleMap(({institutes}) => (
    <GoogleMap
      defaultOptions={{
        fullscreenControl: false,
        mapTypeControl: false,
        streetViewControl: false,
        center: CENTER,
        zoom: 12,
        restriction: {
          latLngBounds: CENTER,
          strictBounds: false,
        },
      }}
    >
      {institutes.map((institute, index) =>
          renderMarker(institute, index)
        )}
    </GoogleMap>
  ))
);
@JustFly1984
Copy link

@GeFeSTTS this package is unmaintained over 4 years. please use @react-google-maps/api instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants