DEV Community

Discussion on: Setup Google Map In Angular App (The Pro Way) Part 1

Collapse
 
helleeni profile image
Helleeni • Edited

Hi, this is great thank you!
Worked with first trial - with some error messages.
I got an error: "ERROR in src/app/app.component.ts:11:8 - error TS2503: Cannot find namespace 'google'." when serving (though map rendered OK as such). Pamela's instructions did not help.
Instead I added a file "index.d.ts" to the ./src directory as instructed here: medium.com/@jkeung/integrating-goo... .The file only contains " declare module 'googlemaps'; ", and then serving again got rid of error message.
I have a repo at github.com/Helleeni/angular-gmap.git

PS. Tried this in a real project and only needed to add "index.d.ts" file with the above mentioned content to get rid of error messages. No other changes necessary (so far ...). Thanks again for great tutorials!

Collapse
 
devpato profile image
Pato

thanks for this! I will make a reference to this comment in the actual post pretty soon and give you credit ;)