GithubHelp home page GithubHelp logo

bjornd / jvectormap Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 429.0 2.96 MB

Home Page: jvectormap.com

License: GNU Affero General Public License v3.0

Shell 0.68% Python 21.92% CSS 3.72% JavaScript 56.08% HTML 17.59%
choropleth data-visualization jquery

jvectormap's People

Contributors

bartvanderwal avatar bjornd avatar datag avatar jorrit avatar onlyjsmith avatar sliterok avatar staeff avatar ubisdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jvectormap's Issues

Focus on region

User should be able to focus on certain region or just place on the map

Converter Only Spitting out Zimbabwe

I'm trying to use the converter using the 110m map data from Natural Earth data and the following command:

python
  converter.py
  result.js
  ne_110m_admin_0_countries.shp
  result.js
  --width 900
  --country_name_index 4
  --minimal_area 4000
  --buffer_distance -3000
  --simplify_tolerance 1000
  --longtitude 10
  --name world

Upon completion, the only country in the result.js file is ZWE (Zimbabwe). I'm trying to create a world map that includes Antarctica so I'm using the provided tool to attempt to create it. I can't for the life of me figure out what I'm doing wrong.

this.markers is undefined error

First of all, thank you for your hard work in creating this project.

When following the example on jvectormap website, I got this error in both Firefox and Chrome (latest):

this.markers is undefined

This is my code, very simple:

$('#my_map').vectorMap({
        map: 'world_en',
        values: gdpData,
        markers: [],   // If I didn't add empty array markers, initialization fails.
        scaleColors: ['#C8EEFF', '#0071A4'],
        normalizeFunction: 'polynomial',
        hoverOpacity: 0.7,
        hoverColor: false
});

As you can see in the snippet, I had to add markers as empty array to work around the bug.

Perhaps var defaultParams need to contains markers?

Border styles

Options for controlling style of the regions border should be available. Style consists of border width, color, opacity.

Mouse hovering over a location prevents color change

When a mouse is hovered over a zone when a page loads and colours are assigned with something like $("#map").vectorMap('set', 'colors', colors);, the country that was under the mouse at the time of loading does not have the color updated properly.

NewYourk shaped file

Dear sir ;

based in your website i understood the following

1-use converter.py paython file
2-and run this command
python
path/to/converter.py
path/to/geo-data.shp
path/to/resulting-map.js
--width 900
--country_name_index 4
--where "ISO = 'USA'"
--codes_file path/to/codes-en.tsv
--insets '[{"codes": ["US-AK"], "width": 200, "left": 10, "top": 370}, {"codes": ["US-HI"], "width": 100, "left": 220, "top": 400}]'
--minimal_area 4000000
--buffer_distance -3000
--simplify_tolerance 1000
--longtitude0 10w
--name us

but i still need to show me USA GIS format which used by you ,if you can also send me New york GIS File

Animations

Any changes of values might be made with animation

set a color country on click event ?

How can i set a color country on click event ?
[code]
div class="country">
a href="" rel="DE">Germany
...
/div>
[/code]
and then Germany come in green on the map.

Can i do that ?

"Getting Started" code on website incomplete

In order to get the example to work, I had to add a script block:

  <script>
      $(function(){
        $('#world-map').vectorMap();
      });
  </script>

As well as id="world-map" to the div element.

Rendering in < IE9

I've generated a few maps from d-maps.com and wikipedia, through Adobe AI, and converted to the correct JS format. Rendering is fine in Chrome/Firefox and IE9, but when I toggle IE to one of the older rendering modes, the maps become totally distorted. Your maps seem fine, however. Example is here:

http://alpha.digital.library.unt.edu/explore/locations/

maps directory:http://alpha.digital.library.unt.edu/media/aubrey_public/scripts/svg/

Any ideas would be appreciated. Great work btw.

W

Converter error

ValueError: No Shapely geometry can be created from null value (India map with buffer distance -1500)

Selected state

API should provide methods for selecting/deselecting of the regions and subscribing for events representing such user actions. So the regions will behave like radio buttons. For turning on of such behavior special should be provided. Special styles could be set for selected regions.

Default zoom parameter?

Is there any way to have the map zoom in on a specific area by default? I want to load the full world map with only markers on the US, so users can zoom out to the whole world after it loads.

jvectormap leaks labels

If I add a jvectormap to the DOM, mouseover it, and then remove it, it leaves behind the label it used for the hover text.

It creates a new label for each jvectormap created and doesn't remove any of them.

code index for Germany

for chicago

country_name_index = 5,
country_code_index =6,

what the index for germany and frensh

jVectorMap and international view

jVectorMap world map is looking great from a european perspective, but countries in other continents expect the world map to be centered on their continent.

Do you think that it could be possible to offset the map "on the fly" to present a different perspective based on user's preference?

Thanks
Philippe

Build system

Build system should be used to merge several files into one, minimize it, replace script links in the tests directory, update version number.

convert.py does not generate map correctly

Used this command line

python converter.py 50m_admin_1_states_provinces_shp.shp usa.js --width 900 --country_name_index 5 \ --where "ISO = 'USA'" --codes_file codes.tsv --minimal_area 400000 --buffer_distance -3000 \ --simplify_tolerance 1000 --longtitude0 10w --name us

An generated usa.js as

$.fn.vectorMap('addMap', 'us_en',{"paths": {"US-NY": {"path": "M845.0...

However, generated maps have pathes instead of paths

$.fn.vectorMap('addMap', 'usa_en', {"width":959,"height":593,"pathes":{"hi":{"p...

and generated map doesn't show unless it is corrected by hand.

www.naturalearthdata.com attribute fields encoded in iso-8859-1

The attribute fields in the map data pulled from www.naturalearthdata.com seems to be encoded in iso-8859-1. This caused problems when attempting to convert maps for countries with non-ascii characters. I'm not sure if this issue is due to my specific development environment or not. My solution was to add .decode('iso-8859-1') to strings pulled from the attribute tables.

ex:
code = feature.GetFieldAsString(self.country_code_index).decode('iso-8859-1')

Add new countries

Love jVectorMap, thanks for the great work.

I recently added it to our kiva.org lender pages, e.g., http://www.kiva.org/lender/penguinsforthewin (at the bottom of the page)

However, some of our lenders noticed some missing countries.

  1. Kosovo
  2. South Sudan

I could produce a patch for adding them in the listing, but for the actual shapes on the map, not sure what your process would be for going about that?

Markers

jVectorMap should have an option to add interactive markers on maps. Coordinates could be provided as lat/lng or in map's pixels.

Tablet features

It would be wonderful if jVectorMap supported some of the features for navigation on tablets, including:

  • Double-click for zoom
  • Pinch/grip zooming
  • double-fingered scrolling

Just a thought: Perhaps eg jQuery Mobile http://jquerymobile.com/ would help.

Webkit warning regarding event.layerX etc

When I load the jVectorMap in Webkit, I get an error like this:

event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

Is there an alternative to event.layerX/etc that would avoid this warning (and future deprecation)?

Style groups

Styles should be grouped in three groups: default, hovered, selected.

Language of map 'de_en' is German

Maybe I'm wrong, but doesn't the 'en' in the name of the map stand for "English", which means that the language of the map should be English? Actually it's german.

Here are the translations (hope they're all correct):

Niedersachsen = Lower Saxony
Schleswig-Holstein = Schleswig-Holstein
Mecklenburg-Vorpommern = Mecklenburg-Vorpommern
Bremen = Bremen
Sachsen-Anhalt = Saxony-Anhalt
Brandenburg = Brandenburg
Berlin = Berlin
Thüringen = Thuringia
Sachsen = Saxony
Nordrhein-Westfalen = North Rhine-Westphalia
Rheinland-Pfalz = Rhineland-Palatinate
Hessen = Hesse
Bayern = Bavaria
Baden-Württemberg = Baden-Württemberg
Saarland = Saarland
Hamburg = Hamburg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.