Use google maps provided @Types file and make agm more extensible
See original GitHub issueIssue description
Make AGM extensible and Use @Types/googlemaps so that features can be added easily
Steps to reproduce and a minimal demo of the problem
In its current form AGM uses custom mapTypes sometimes these Types slightly veer slightly from the googlemaps types and may be the source of some known bugs. I propose we use the @types/googlemaps dependency instead of custom types. This makes AGM easily extensible in most cases. I have made a pull request #1461 that is refactored to use googlemaps and also identified a number of variations from the @types library
What steps should we try in your demo?
you can build https://github.com/wdunn001/angular-google-maps and use it to try it I currently don’t have all the tests passing but it runs just fine I use it in my current project.
alternatively you can npm install --save @agme/core
which I set up for my use
Current behavior agm uses custom mapTypes
Expected/desired behavior use the typings provided by google
angular2 & angular-google-maps version @latest
Other information
in addition, this pr identified numerous logic issues such as recasting of already typed values and redundant splice logic. some changes were required to make this compatible with googlemaps such as using a map(f => l.add(f)) to populate the features with the built in google maps funtion.
I found enum’s to be particularly problematic I implemented a switch case that could probrably be switched to a map.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5
Top GitHub Comments
+1 I want MVCObject…specially #set #get agm types only defines addlistener…
i followed this approach : https://stackoverflow.com/a/55451667/1427338
NB: Don’t forget to restart the active ng serve session Also if you are using extra libraries like DrawingManager: