/** * Sets the center of the map. * * @param Map $map * @return string The html */ protected function setMapCenter(Map $map) { return sprintf('%s.setView(new L.LatLng(%s, %s), %u);', $map->getVarName(), $map->getCenter()->getLat(), $map->getCenter()->getLng(), $map->getZoom()); }
/** * Sets the zoom level for the map. * * @param Map $map The map * @return string The html */ protected function setMapZoom(Map $map) { return sprintf('%s.setView({ zoom: %s });', $map->getVarName(), $map->getZoom()); }