Beispiel #1
0
    })

H.add_map_data(geojson,
               name='Basemap',
               borderColor='#606060',
               nullColor='rgba(200, 200, 200, 0.2)',
               showInLegend=False)
H.add_data_set(geojson_handler(geojson, 'mapline'),
               'mapline',
               'Separators',
               showInLegend=False,
               enableMouseTracking=False)
H.add_data_set(data,
               'mapbubble',
               'Cities',
               dataLabels={
                   'enabled': True,
                   'format': '{point.capital}'
               },
               maxSize='12%',
               is_coordinate=True)

H.set_dict_options(options)

fobj = open(
    '/home/jmmauricio/Documents/public/workspace/pypstools/dev/high/map.html',
    'w')
fobj.write(H.htmlcontent)

fobj.close()
        "code": "DE.BW",
        "value": 157
    },
    {
        "code": "DE.HE",
        "value": 134
    },
    {
        "code": "DE.NI",
        "value": 136
    },
    {
        "code": "DE.TH",
        "value": 704
    }
]
H.set_dict_options(options) # set options
H.add_data_set(data, 'map', 'Random data', joinBy=['code_hasc', 'code'], # set dataset
                states={
                    'hover': {
                        'color': '#BADA55'
                    }
                },
                dataLabels={
                    'enabled': True,
                    'format': '{point.properties.postal}'
                })

H.set_map_source('http://www.highcharts.com/samples/data/jsonp.php?filename=germany.geo.json&callback=?', True) # set map data from the src (jsonp)

H.htmlcontent
                    'align': 'left',
                    'x': 5,
                    'verticalAlign': 'middle'
                }
            }]

fake_data = []
options = {
        'title': {
            'text': 'Highmaps basic lat/lon demo'
        },

        'mapNavigation': {
            'enabled': True
        },

        'tooltip': {
            'headerFormat': '',
            'pointFormat': '<b>{point.name}</b><br>Lat: {point.lat}, Lon: {point.lon}'
        },
        
    }
H.add_map_data(geojson, name = 'Basemap' ,borderColor = '#A0A0A0',
            nullColor = 'rgba(200, 200, 200, 0.3)',
            showInLegend = False)    
H.add_data_set(data,'mappoint','Cities',color = 'Highcharts.getOptions().colors[1]', is_coordinate = True)
H.add_data_set(geojson_handler(geojson, 'mapline'),
    'mapline','Separators',color = '#707070', showInLegend = False, enableMouseTracking = False)
H.set_dict_options(options)

H.htmlcontent
        "value": 237
    }, {
        "code": "DE.BW",
        "value": 157
    }, {
        "code": "DE.HE",
        "value": 134
    }, {
        "code": "DE.NI",
        "value": 136
    }, {
        "code": "DE.TH",
        "value": 704
    }
]
H.set_dict_options(options)  # set options
H.add_data_set(
    data,
    'map',
    'Random data',
    joinBy=['code_hasc', 'code'],  # set dataset
    states={'hover': {
        'color': '#BADA55'
    }},
    dataLabels={
        'enabled': True,
        'format': '{point.properties.postal}'
    })

H.set_map_source(
    'http://www.highcharts.com/samples/data/jsonp.php?filename=germany.geo.json&callback=?',