Class: directive_ directive:ngeoRecenter

new directive_()

Provides the "ngeoRecenter" directive, a widget for recentering a map to a specific extent (by using ngeo-extent) or a specific zoom level (by using ngeo-zoom).


 <div ngeo-recenter ngeo-recenter-map="">
   <a href="#" ngeo-extent="[-1898084, 4676723, 3972279, 8590299]">A</a>
   <a href="#" ngeo-extent="[727681, 5784754, 1094579, 6029353]">B</a>
   <a href="#" ngeo-zoom="1">Zoom to level 1</a>

Or with a select:

 <select ngeo-recenter ngeo-recenter-map="">
   <option ngeo-extent="[-1898084, 4676723, 3972279, 8590299]">A</option>
   <option ngeo-extent="[727681, 5784754, 1094579, 6029353]">B</option>

See our live example: ../examples/recenter.html

HTML attributes:
Name Type Description
ngeo-recenter-map ol.Map The map.

Directive Definition Object.