So far we've seen the breadth of features possible with AMP. Sometimes, however, AMP is just not enough. There might be some functionality that you really need, but despite AMP's extensive list of components, it's not supported. A solution may still be possible. Sometimes referred to as the duct tape of AMP, amp-iframe
might be able to help.
In this chapter, we'll see how the amp-iframe
component can be used to plug functionality gaps in AMP. In particular, we'll see how to:
- Add a Google map to an AMP page
- Implement a searchable map
- Use the geolocation feature of the user's device, and plot routes
- Add Disqus comments to an AMP page
- Add a checkout payment process to our e-commerce prototype