Mapnik Beginner's Notes

Source: Internet
Author: User
Tags install node

Preface: Summer always feel want to sleep, the heart of decadent I want to be in the work of Six days, but some things although trouble, but still want to do, can't help but think of Naruto inside the deer pill this role, sometimes really understand his mental state, perhaps I should learn from him: thinking Mind + A leisurely state of life. Before the array wants to play node. js, these days because of watching the SLR tutorial and revision to the pause, there is now a project about the map to do, there is an interesting tool called Mapnik, do not know whether you have heard, anyway I have not heard of, But what surprises me is that Mapnik can play with node. js, Oh, yes.

Mapnik:

Mapnik is a toolkit for developing GIS applications, the core of which is a C + + shared library that provides algorithms and patterns for spatial data access and visualization. In particular, some geographic objects, such as maps, layers, data sources, features, and geographic geometry, are included. The shared library supports a variety of operating systems and can run well in multithreaded environments, primarily for Web application development that provides GIS services.

From another perspective, Mapnik is an open source python/node.js/c++ map rendering engine, which functions as a map of data, including some geographic objects, such as maps, layers, data sources, features, and geographic geometry, and is rendered into a bitmap format through the definition of a style sheet. Used to provide a network map service (WMS Service).

Vector Tiles:

Vector tile is to convert the vector data into a picture block , for online maps, with the help of the tile caching mechanism, to achieve a scalable map rendering service, each image block represents a coordinate area.

A vector tile that contains all the coordinate information and metadata, such as road name, parcel type, and building height, in a compact, resolvable format. Vector tiles are a high-performance format that is more flexible in style, output format, and interactivity.

3.node.js and Express

node. JS is a platform built on the chrome JavaScript runtime to easily build responsive, easy-to-scale Web applications. node. js is lightweight and efficient with event-driven, non-blocking I/O models and is ideal for data-intensive, real-time applications running on distributed devices.

node. JS Official website: https://nodejs.org/

Express is a concise and flexible node. JS WEB Application Development Framework that provides a range of powerful features to help you create a wide variety of web and mobile device applications.

Recommended Sites: http://www.expressjs.com.cn/

Building Local HTTP Access Service commands via node. js and Express:(Windows-based)

Download and install node. js on the node. JS website

Confirm that Node-v is installed

NPM installs Express plugin NPM install Express

Express Install node. JS Project Bin Express Bin

Go to the project directory, install the node. JS Dependency Module CD bin && NPM installation

Start the service node./bin/www

Browser input http://localhost:3000/, access. (localhost can be changed to an IP address)

Mapbox Studio:

About Mapnik The use of this toolkit I found a software for everyone to refer to, that is, Mapbox launched Mapbox Studio, the official website is Https://www.mapbox.com/,mapbox is a more professional map application, can be customized out of simple, professional, Nice map, but we need a Mapbox account to access the default vector tile data source in Mapbox.

and Mapbox Studio is an open source software, using a lot of web technology, including Mapnik, node. js, Backbone.js, Codemirror, leaflet, etc., its client itself is a WebApp + Chrome, Cross-platform and have a good interaction experience, joined the front-end technology. Mapbox Studio is a newly designed application by Mapbox with full support for vector tiles, open source, Mapbox Studio code hosted on GitHub.

Mapbox Studio is based on vector tiles, making style rendering faster, allowing anyone to use a huge number of global databases, and styling changes to the layout can be done within seconds. Independent resolution, vector tile-based styling projects that support retina screens and support up to 600dpi rendering, which is not supported by normal maps.

Mapbox Studio This platform is based on the Mapnik vector tile format and is rendered in the back end with Mapnik. PS: Any individual tile can not exceed 500k, when optimized, remember to reduce the minimum scale of the data source, so that at a lower zoom level, each vector tile contains less data.

Mapnik Beginner's Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.