سؤال

I am trying to focus on any region when it is clicked. for that I'm using following code:

onRegionClick: function(event, code){
          $('#map1').vectorMap('set', 'focus', code);
      }

Above code works fine for all the regions except when the code is "US". I don't understand why.

هل كانت مفيدة؟

المحلول

The problem is that US has part of its territory in the east. You can pass specific coordinates and scale to US to focus on the main continental part of the US only.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top