Hi,
we can achieve it as stated below"
Google provide sample to do so.
This problem is same as using third party java-script plugins in AEM.
Link [0]:- https://helpx.adobe.com/experience-manager/using/custom-carousel-components.html
// Creating Custom Carousel components for Adobe Experience Manager
Google Javascript Code:- https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
So just add this section in in the [0] and you will get what you are asking for.
Can you also let us know, what do you mean by "when I add the same component under content folder of any other project and dragon drop it" ? Also are you getting some browser errors?
~kautuk