2

I am creating a control to be used in a DNN site that will display the US map using jVectoMap.

When I click Colorado I need the state map to appear with the counties defined. Eventually I would like to have all of the US states but Colorado is critical right now.

I have tried running different Shape files through the converter as documented on the website but so far I haven't been able to get the counties. I have also contacted the developer three days ago now but have yet to hear back.

Unfortunately I am on a deadline for this and don't have anymore time to waste trying and failing.

Does anybody have a Colorado map with the county lines that is copyright free to use? Or is somebody willing to make one($-PM me)?

Any help is appreciated, thanks.

BTW if there is another library out there that has the US and state county maps available, I'm not married to jVectorMap.

4
  • check this question stackoverflow.com/questions/3544041/…
    – mfs
    Jul 25, 2014 at 16:01
  • That is interesting, I'm wondering how I can use that with jVectorMap? Basically what I need to do is click on a state on the US map, pull up a map of that state with the counties, and when the user clicks on that county it loads certain data Jul 25, 2014 at 17:23
  • @PurpleKoolAid Did you figure out how to display county? If so, could you please share it; I'm also in same saturation.
    – Win
    Aug 1, 2014 at 19:17
  • @Win I have posted the answer Aug 2, 2014 at 20:34

2 Answers 2

3

I fixed this problem for all states by downloading the full project for jvectormap - http://jvectormap.com/download/

and under /tests/assets/us the author includes all the js files needed. Just copy them over to your project and use:

new jvm.MultiMap({
    container: $('.jvectormap-container'),
    maxLevel: 1,
    main: {
      map: 'us_lcc_en'
    },
    mapUrlByCode: function(code, multiMap){
      return '../js/counties/jquery-jvectormap-data-'+
             code.toLowerCase()+'-'+
             multiMap.defaultProjection+'-en.js';
    }
  });

and it will load each of the county maps on demand

1

How I solved this:

First use this site to find a .svg of the map you need: http://commons.wikimedia.org/wiki/File:Blank_map_of_Colorado.svg

Majority of these maps are free to use however you see fit. Just read the terms to be sure.

Then open the .svg with notepad/notepad++ etc. and paste everything to this site: http://svgto.jvectormap.com/

After you paste, hit 'Convert to map' and on the next page you will be able to create the Names (which show up on the hover labels for jVectorMap) and the IDs.

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.