I have a polygon and want to create a new polygon inside it which is spaced exactly 5 metres from the edge all around.
My thinking is to calculate the centroid, then get each point of the outer polygon and move it 5 metres towards the centroid.
Using the google.maps.geometry.spherical functions I should be able to computeHeading() to get the direction towards the centroid, then computeOffset() using the distance and the heading (direction).
This would move all of the vertices in by 5 metres. Would this mean that all my lines would automatically be spaced at 5 metres apart or would it depend on angles? I can do the JavaScript, not sure about the geometry. Is there a better approach?