Comments (5)
@argarner Hi,
I upgraded the peer dependencies and released a new version - 2.0.6.
Can you please check it out?
from react-leaflet-google-layer.
Thanks for the quick response @aviklai! Unfortunately, I'm still seeing the typescript conflicts with the ReactLeafletGoogleLayer component.
Type '{ apiKey: string; type: string; styles: ({ featureType: string; stylers: { saturation: number; }[]; } | { featureType: string; elementType: string; stylers: { visibility: string; }[]; })[]; }' is not assignable to type 'IntrinsicAttributes & LayerProps & IProps & RefAttributes<GridLayer>'.
Property 'type' does not exist on type 'IntrinsicAttributes & LayerProps & IProps & RefAttributes<GridLayer>'.ts(2322)
On deeper inspection, we were previously on "react-leaflet-google-layer": "^2.0.4"
, so it looks like this change in import back in Feb may have made the googlemutant
types inaccessible to consumers (used to resolve interface gridLayer.GoogleMutantOptions
, but is now showing as any
)?
I don't know enough about typescript type/library packaging to know why. Maybe:
-
Outdated dependencies? Latest are
npm i @types/[email protected] @googlemaps/[email protected]
-
Deprecated devDependency? @types/googlemaps was deprecated last year, and is now @types/google.maps.
-
Due to the change in import back in Feb, is there another way to force the bundling of
@types/leaflet.gridlayer.googlemutant
types for upstream consumers? -
Is it possible the issue stems from the
leaflet.gridlayer.googlemutant
pkg and it needing an update due to the release of leaflet 1.8? -
Otherwise, many of the devDependency types are outdated (.e.g "@types/react": "^16.8.7"), but I can't see how they would be the cause...
from react-leaflet-google-layer.
If I silence the typescript error with // @ts-expect-error
our app appears to render fine, but bouncing around different map views in our storybook indicates there is a new issue with GoogleMutant and it's [email protected]
compatibility, that we have not seen previously.
from react-leaflet-google-layer.
FYI I've just raised a new issue on the googlemutant add-on, related to leaflet 1.8.0 compatibility.
from react-leaflet-google-layer.
@argarner Hi,
Regarding the typescript issue, are you importing the library the following way?
import ReactLeafletGoogleLayer from 'react-leaflet-google-layer';
And can you please create a codesansbox that reproduces your typescript issue?
Because I am not able to reproduce it.
from react-leaflet-google-layer.
Related Issues (20)
- Not able to add traffic layer HOT 8
- Support for react-leaflet 3.x HOT 3
- State updates causes the library to include Google JS API multiple times HOT 4
- Is is possible to hide/disale POI points of interest? HOT 1
- Support React v17 HOT 1
- Uncaught Error: No context provided: useLeafletContext() can only be used in a descendant of <MapContainer> HOT 6
- which version of react-leaflet-google-layer for react-leafet 2.7.0 HOT 3
- Cannot specify map type or any other GoogleMutant property HOT 4
- @googlemaps/js-api-loader need to be upgraded to version "^1.12.12" to resolve error notification with react 17 HOT 1
- Module breaks when updating to [email protected] HOT 2
- Dynamic Layer Switch HOT 7
- The shapes do not match the Google Map layer HOT 7
- Google Maps is not loading HOT 7
- Switch between OSM and GMap at runtime HOT 1
- Portion of Google Layer not loading when width changes in firefox HOT 2
- Is it possible to make places of interest clickable? HOT 1
- Is it possible to make custom map style? HOT 1
- Dynamic map type switch HOT 2
- Using react-leaflet-google-layer in react application we have some error how to solve ?? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-leaflet-google-layer.