交互式地图构建库 Kartograph

码农软件 · 软件分类 · jQuery 地图插件 · 2019-12-14 07:59:02

软件介绍

Kartograph 是个构建交互式地图的简单、轻量级类库。

它包含两个库,一个用Python写的,用于产生漂亮和压缩的SVG地图,另一个是js类库用于前端展示地图用。

示例代码:

// cities is a list of dictionaries such as
cities = [{ city_name: "Berlin", nb_visits: 1496, lon: 13.4, lat: 52.517 }, ...];

// create a scale for radii
var scale = $K.scale.sqrt(cities, 'nb_visits').range([0, 40]);

// add bubbles to the map
map.addSymbols({
    type: $K.Bubble,
    data: cities,
    location: function(city) {
        return [city.lon, city.lat];
    },
    radius: function(city) {
        return scale(city.nb_visits);
    },
    tooltip: function(city) {
        return '<h3>'+city.city_name+'</h3>'+city.nb_visits+' visits';
    },
    sortBy: 'radius desc',
    style: 'fill:#800; stroke: #fff; fill-opacity: 0.5;',
});

本文地址:https://codercto.com/soft/d/21108.html

Web Anatomy

Web Anatomy

Robert Hoekman Jr.、Jared Spool / New Riders / 2009-12-11 / USD 39.99

At the start of every web design project, the ongoing struggles reappear. We want to design highly usable and self-evident applications, but we also want to devise innovative, compelling, and exciting......一起来看看 《Web Anatomy》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具