Take pixel ratio into account in layer-spy example

The layer-spy example does not take into account the pixel ratio on retina devices. This PR fixes that.