Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the map collection - county assigned to the wrong state #7116

Closed
kamilkulig opened this issue Aug 31, 2017 · 8 comments
Closed

Bug in the map collection - county assigned to the wrong state #7116

kamilkulig opened this issue Aug 31, 2017 · 8 comments

Comments

@kamilkulig
Copy link
Contributor

This is the map of Saxony (Sachsen): http://jsfiddle.net/gh/get/library/pure/highslide-software/highcharts.com/tree/master/samples/mapdata/countries/de/de-sn-all
It is missing its northernmost county (Nordsachsen).

This is the map of the neighboring state of Sachsen-Anhalt: http://jsfiddle.net/gh/get/library/pure/highslide-software/highcharts.com/tree/master/samples/mapdata/countries/de/de-st-all
The map shows the county Nordsachsen there - although it does not belong to that state.

This link verifies that there's a bug in the map: https://de.wikipedia.org/wiki/Landkreis_Nordsachsen

@KacperMadej
Copy link
Contributor

Hi,

Thank you for reporting about the problem.

@OliverHavlat
Copy link

Hey there,

is there any solution to this problem in sight? It's been six months now. If there is any way I can help (I am not a developer), let me know.

Best regards
Oliver

@KacperMadej
Copy link
Contributor

Hi @OliverHavlat

We'll be handling the case during this and/or next week.

@KacperMadej
Copy link
Contributor

The issue should be resolve in next map collection release. For now you can use the code provided in the demos.

Sachsen (added Nordsachsen): http://jsfiddle.net/BlackLabel/wtps0evL/
Sachsen-Anhalt (removed Nordsachsen): http://jsfiddle.net/BlackLabel/9uh1hnjh/

If you need other files for map (svg or gejson), then please let me know and I can share.

In case of any problems with the maps, please let us know, so we could improve them before next release.

@OliverHavlat
Copy link

Hi @KacperMadej ,

thanks for the bugfix. I have tried many things, but finally I must admit that I don't know how to implement this. I have this on my site:

<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.6/proj4.js"></script><script src="https://code.highcharts.com/maps/highmaps.js"></script><script src="https://code.highcharts.com/maps/modules/exporting.js"></script><script src="https://code.highcharts.com/mapdata/countries/de/de-sn-all.js"></script>
<div id="container" style="min-width: 310px; max-width: 1200px; height: 740px; margin: 0 auto;"><script>
// Initiate the chart
Highcharts.mapChart('container', {

    title: {
        text: ''
    },

    mapNavigation: {
        enabled: true
    },

		exporting: {
    		enabled: false
    },

    tooltip: {
        headerFormat: '',
		useHTML: true,
		style: {
			pointerEvents: 'auto'
			},
        pointFormat: '{point.name}'
    },

    series: [{
        // Use the de-sn-all map with no data as a basemap
        mapData: Highcharts.maps['countries/de/de-sn-all'],
        name: 'Basemap',
        borderColor: '#ffffff',
        nullColor: 'rgba(93, 118, 123, 0.2)',
        showInLegend: false
    }, {
        name: 'Separators',
        type: 'mapline',
        data: Highcharts.geojson(Highcharts.maps['countries/de/de-sn-all'], 'mapline'),
        color: '#000000',
        showInLegend: false,
        enableMouseTracking: false
    }, {
        // Specify points using lat/lon
        type: 'mappoint',
        name: 'Beratungsstellen',
        color: '#c83f3f',
		visible: true,
		marker: {
				symbol: 'circle',
				radius: 4,
            },
        dataLabels: {
        	align: 'center',
        	allowOverlap: false,
          },
        data: [{
            name: '<a href="/beratungsstellen/leipzig">Leipzig</a>',
            lat: 51.3396955,
            lon: 12.373074699999961
        },
		{   name: '<a href="/beratungsstellen/aue">Aue</a>',
            lat: 50.5873296,
            lon: 12.699016000000029
        },
		{   name: '<a href="/beratungsstellen/auerbach">Auerbach</a>',
            lat: 50.50796919999999,
            lon: 12.39813730000003
        },
		{   name: '<a href="/beratungsstellen/bautzen">Bautzen</a>',
            lat: 51.18229299999999,
            lon: 14.423774900000012
        },
		{   name: '<a href="/beratungsstellen/chemnitz">Chemnitz</a>',
            lat: 50.827845,
            lon: 12.921369700000014
        },
		{   name: '<a href="/beratungsstellen/dresden">Dresden</a>',
            lat: 51.05040880000001,
            lon: 13.737262099999953
        },
		{   name: '<a href="/beratungsstellen/grossenhain">Großenhain</a>',
            lat: 51.29122749999999,
            lon: 13.531303999999977
        },
		{   name: '<a href="/beratungsstellen/goerlitz">Görlitz</a>',
            lat: 51.15062690000001,
            lon: 14.968706999999995
        },
		{   name: '<a href="/beratungsstellen/hoyerswerda">Hoyerswerda</a>',
            lat: 51.4388605,
            lon: 14.253641900000048
        },
		{   name: '<a href="/beratungsstellen/markkleeberg">Markkleeberg</a>',
            lat: 51.2748681,
            lon: 12.366457399999945
        },
		{   name: '<a href="/beratungsstellen/meissen">Meißen</a>',
            lat: 51.16178419999999,
            lon: 13.497659200000044
        },
		{   name: '<a href="/beratungsstellen/oschatz">Oschatz</a>',
            lat: 51.3006128,
            lon: 13.105982499999982
        },
		{   name: '<a href="/beratungsstellen/pirna">Pirna</a>',
            lat: 50.9625175,
            lon: 13.941916799999944
        },
		{   name: '<a href="/beratungsstellen/plauen">Plauen</a>',
            lat: 50.4976133,
            lon: 12.13686789999997
        },
		{   name: '<a href="/beratungsstellen/riesa">Riesa</a>',
            lat: 51.3117871,
            lon: 13.267700399999967
        },
		{   name: '<a href="/beratungsstellen/torgau">Torgau</a>',
            lat: 51.557934,
            lon: 12.991582999999991
        },
		{   name: '<a href="/beratungsstellen/weisswasser">Weißwasser</a>',
            lat: 51.5043518,
            lon: 14.634592600000019
        },
		{   name: '<a href="/beratungsstellen/zittau">Zittau</a>',
            lat: 50.8999681,
            lon: 14.80299709999997
        },		
		{   name: '<a href="/beratungsstellen/zwickau">Zwickau</a>',
            lat: 50.7102169,
            lon: 12.473372499999982
        }]
    },
     {
        // Specify points using lat/lon
        type: 'mappoint',
        name: 'Energieberatung',
        color: '#333333',
		visible: true,
		marker: {
				symbol: 'circle',
				radius: 4,
            },
        data: [{
        	name: '<a href="/beratungsstellen/adorf-energieberatung">Adorf</a>',
        	lat: 50.3204083,
            lon: 12.25619370000004
        },
        {	name: '<a href="/beratungsstellen/annaberg-buchholz-energieberatung">Annaberg-Buchholz</a>',
        	lat: 50.578587,
            lon: 13.00758350000001
		},
        {	name: '<a href="/beratungsstellen/bad-dueben-energieberatung">Bad Düben</a>',
        	lat: 51.5943957,
            lon: 12.589375300000029
		},
        {	name: '<a href="/beratungsstellen/bischofswerda-energieberatung">Bischofswerda</a>',
        	lat: 51.1252883,
            lon: 14.184202599999935
		},
        {	name: '<a href="/beratungsstellen/borna-energieberatung">Borna</a>',
        	lat: 51.12459769999999,
            lon: 12.49232219999999
		},
        {	name: '<a href="/beratungsstellen/delitzsch-energieberatung">Delitzsch</a>',
        	lat: 51.52557400000001,
            lon: 12.338099300000067
		},
        {	name: '<a href="/beratungsstellen/doebeln-energieberatung">Döbeln</a>',
        	lat: 51.12293219999999,
            lon: 13.11671960000001
		},
        {	name: '<a href="/beratungsstellen/ebersbach-energieberatung">Ebersbach</a>',
        	lat: 51.2398221,
            lon: 13.660694599999943
		},
        {	name: '<a href="/beratungsstellen/eibenstock-energieberatung">Eibenstock</a>',
        	lat: 50.4949857,
            lon: 12.599639300000035
		},
        {	name: '<a href="/beratungsstellen/eilenburg-energieberatung">Eilenburg</a>',
        	lat: 51.4597557,
            lon: 12.617702000000008
		},
        {	name: '<a href="/beratungsstellen/freiberg-energieberatung">Freiberg</a>',
        	lat: 50.90884550000001,
            lon: 13.34472059999996
		},
        {	name: '<a href="/beratungsstellen/glauchau-energieberatung">Glauchau</a>',
        	lat: 50.8281461,
            lon: 12.548316800000066
		},
        {	name: '<a href="/beratungsstellen/grimma-energieberatung">Grimma</a>',
        	lat: 51.2364426,
            lon: 12.720231300000023
		},
        {	name: '<a href="/beratungsstellen/grossenhain-energieberatung">Großenhain</a>',
        	lat: 51.29122749999999,
            lon: 13.497970555555554
		},
        {	name: '<a href="/beratungsstellen/johanngeorgenstadt-energieberatung">Johanngeorgenstadt</a>',
        	lat: 50.4360485,
            lon: 12.708192899999972
		},
        {	name: '<a href="/beratungsstellen/kamenz-energieberatung">Kamenz</a>',
        	lat: 51.27490679999999,
            lon: 14.102487999999994
		},
        {	name: '<a href="/beratungsstellen/kirchberg-energieberatung">Kirchberg</a>',
        	lat: 50.6223188,
            lon: 12.522452499999986
		},
        {	name: '<a href="/beratungsstellen/klingenthal-energieberatung">Klingenthal</a>',
        	lat: 50.370718,
            lon: 12.468170800000053
		},
        {	name: '<a href="/beratungsstellen/leipzig-west-energieberatung">Leipzig West</a>',
        	lat: 51.3396955,
            lon: 12.339741111111111
		},
        {	name: '<a href="/beratungsstellen/limbach-oberfrohna-energieberatung">Limbach-Oberfrohna</a>',
        	lat: 50.85756619999999,
            lon: 12.753719799999999
		},
        {	name: '<a href="/beratungsstellen/markranstaedt-energieberatung">Markranstädt</a>',
        	lat: 51.30461560000001,
            lon: 12.22112560000005
		},
        {	name: '<a href="/beratungsstellen/meerane-energieberatung">Meerane</a>',
        	lat: 50.8472857,
            lon: 12.463722299999972
		},
        {	name: '<a href="/beratungsstellen/mittweida-energieberatung">Mittweida</a>',
        	lat: 50.9853149,
            lon: 12.974055700000008
		},
        {	name: '<a href="/beratungsstellen/neustadt-energieberatung">Neustadt</a>',
        	lat: 51.035552,
            lon: 14.22600060000002
		},
        {	name: '<a href="/beratungsstellen/niesky-energieberatung">Niesky</a>',
        	lat: 51.29315010000001,
            lon: 14.831172000000038
		},
        {	name: '<a href="/beratungsstellen/oederan-energieberatung">Oederan</a>',
        	lat: 50.8619895,
            lon: 13.170880300000022
		},
        {	name: '<a href="/beratungsstellen/oelsnitz-energieberatung">Oelsnitz</a>',
        	lat: 50.4175985,
            lon: 12.175807299999974
		},
        {	name: '<a href="/beratungsstellen/pirna-energieberatung">Pirna</a>',
        	lat: 50.9625175,
            lon: 13.908583333333334
		},
        {	name: '<a href="/beratungsstellen/radeburg-energieberatung">Radeburg</a>',
        	lat: 51.2129606,
            lon: 13.723266599999988
		},
        {	name: '<a href="/beratungsstellen/reichenbach-energieberatung">Reichenbach</a>',
        	lat: 50.6175423,
            lon: 12.299001599999997
		},
        {	name: '<a href="/beratungsstellen/sebnitz-energieberatung">Sebnitz</a>',
        	lat: 50.9709117,
            lon: 14.27387299999998
		},
        {	name: '<a href="/beratungsstellen/taucha-energieberatung">Taucha</a>',
        	lat: 51.3798014,
            lon: 12.495053900000016
		},
        {	name: '<a href="/beratungsstellen/treuen-energieberatung">Treuen</a>',
        	lat: 50.5435567,
            lon: 12.299369800000022
		},
        {	name: '<a href="/beratungsstellen/wilsdruff-grumbach-energieberatung">Wilsdruff</a>',
        	lat: 51.0503651,
            lon: 13.536334899999929
		},
        {	name: '<a href="/beratungsstellen/leipzig-stoetteritz-energieberatung">Leipzig Stötteritz</a>',
        	lat: 51.3396956,
            lon: 12.421023200000036
		},
        {	name: '<a href="/beratungsstellen/leipzig-technisches-rathaus-energieberatung">Leipzig Technisches Rathaus</a>',
        	lat: 51.3230289,
            lon: 12.373074444444445
		},		
        {	name: '<a href="/beratungsstellen/wurzen-energieberatung">Wurzen</a>',
        	lat: 51.36988059999999,
            lon: 12.743655699999977
        }],
}]
});
</script></div>

Where can I put the code that adds the missing country?

Thanks again for your help!

Best regards
-Oliver

@KacperMadej
Copy link
Contributor

@OliverHavlat

Instead of loading the map from our CDN use the map from my previous comment (see HTML section of the below demo). Here's a demo of the fixed Sachsen region with your chart config and data: http://jsfiddle.net/BlackLabel/wtps0evL/1/

@OliverHavlat
Copy link

Wow! - Thank you so much! That works pretty well. Saxony is now complete...
https://www.verbraucherzentrale-sachsen.de/beratung-sn

@jon-a-nygaard
Copy link
Contributor

We have created a seperate repository for the map collection, and we are transfering the issues related to the map collection to this new repository.

Please continue the discussion and follow the future development of this issue at highcharts/map-collection-dist#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants