title: Zoom to Marker location on click -OpenLayers
body: <p>I am displaying markers on the map from geojson file. In the current code, I can add the markers on the map. I want to add fly to or zoom in marker exact location upon click on the marker.how can I achieve that using OpenLayers.</p>
  <pre><code>var cityMarker = new ol.layer.Vector({
    source: new ol.source.Vector({
        format: new ol.format.GeoJSON(),
        url: &quot;data/cities.js&quot;
    }),
    style: new ol.style.Style({
      image: new ol.style.Icon({
              anchor: [0.5, 0.5],
              anchorXUnits: 'fraction',
              anchorYUnits: 'pixels',
              scale:0.03,
              src: &quot;icons/red-circle.png&quot;
            })
        })  
  });
  map.addLayer(cityMarker);
  </code></pre>