Search code examples
azureazure-maps

Azure Maps - Change the Map center on an event click on another html element


I am building SPA react page with azure maps control. I have a sort of left navigation control which represents a list of offices that we have across the globe.

I load the maps with a default center focused on North America, now i have to change the maps center when some one click on an office location in Europe in left nav.

Is there a sample around that, i tried changing the map center in the option but the map never recenter.


Solution

  • You might also find these sample useful: https://azuremapscodesamples.azurewebsites.net/index.html?sample=Page%20through%20POI%20results

    https://azuremapscodesamples.azurewebsites.net/index.html?sample=Interactive%20Search%20Quickstart