I rewrite code samples from Google Maps API to OpenLayers API.