react-google-maps icon indicating copy to clipboard operation
react-google-maps copied to clipboard

In overlayview unable to use link to, please help to fix the issue

Open SivanKarthick opened this issue 4 years ago • 3 comments

<OverlayView position={{ lat: marker.currentInfo.latitude, lng: marker.currentInfo.longitude }} mapPaneName={OverlayView.OVERLAY_MOUSE_TARGET} getPixelPositionOffset={getPixelPositionOffset} > <div className="circle"> <NavLink link='/vehicleInfo/trace' > <div className="img1" > <img src="images/Dashboadimgs/V2.png" alt="test"/></div> </NavLink> <div className="innercircle"></div> </div> </OverlayView>

SivanKarthick avatar Nov 22 '19 13:11 SivanKarthick

Uncaught Error: Invariant failed: You should not use <Link> outside a <Router> at invariant (tiny-invariant.esm.js:12) at react-router-dom.js:181 at updateContextConsumer (react-dom.development.js:19064) at beginWork$1 (react-dom.development.js:19422) at HTMLUnknownElement.callCallback (react-dom.development.js:363) at Object.invokeGuardedCallbackDev (react-dom.development.js:412) at invokeGuardedCallback (react-dom.development.js:466) at beginWork$$1 (react-dom.development.js:24570) at performUnitOfWork (react-dom.development.js:23505) at workLoopSync (react-dom.development.js:23480) at renderRoot (react-dom.development.js:23155) at scheduleUpdateOnFiber (react-dom.development.js:22653) at scheduleRootUpdate (react-dom.development.js:25686) at updateContainerAtExpirationTime (react-dom.development.js:25712) at updateContainer (react-dom.development.js:25812) at react-dom.development.js:26370 at unbatchedUpdates (react-dom.development.js:22952) at legacyRenderSubtreeIntoContainer (react-dom.development.js:26369) at Object.unstable_renderSubtreeIntoContainer (react-dom.development.js:26479) at OverlayView.draw (OverlayView.js:136) at Object.wrapper [as draw] (_createBind.js:24) at Lw.draw (overlay.js:4) at Mw.Ta (overlay.js:5) at fw (map.js:37) at map.js:39

SivanKarthick avatar Nov 22 '19 14:11 SivanKarthick

@SivanKarthick The repo of this project is unmaintained more than a year, and we had build new version https://www.npmjs.com/package/@react-google-maps/api

We had rewrite it to TypeScript, and updating it frequently: https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api You can enjoy autocomplete.

You can see our docs: https://react-google-maps-api-docs.netlify.com/

Also a lot of examples: https://react-google-maps-api-gatsby-demo.netlify.com/ https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api-gatsby-example/src/examples

The bundle size is much smaller: https://bundlephobia.com/result?p=@react-google-maps/[email protected]

Our Spectrum community: https://spectrum.chat/react-google-maps

Enjoy!

JustFly1984 avatar Nov 22 '19 21:11 JustFly1984

ok thanks, I will check and confirm

SivanKarthick avatar Nov 23 '19 05:11 SivanKarthick