Topic: Need to return state name or abbreviation from vector map plugin

vbagal-i360 free asked 4 years ago


Expected behavior I would like to see the vector map return the state name as a variable. Actual behavior Unable to do so Resources (screenshots, code snippets etc.) My javascript game is weak and I really want am looking at this plugin as a short cut to get a dynamic state selection tool - the data would get passed into existing ajax routines that will eventually open a window with related data from a database.


Krzysztof Wilk staff answered 4 years ago


Hi!

You can initialize your map like this:

  const map = new jvm.WorldMap({
    options
  });

then get this instance using map.getMapObject(). Now you have access to all properties. If you want to set (for example) regions as a value of a variable, you can do this like below:

const regions = map.getMapObject().regions;

Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.11
  • Device: linux hosted - site5
  • Browser: any
  • OS: various -
  • Provided sample code: No
  • Provided link: No