Giter VIP home page Giter VIP logo

leaflet.koreantmsproviders's Introduction

Leaflet.KoreanTmsProviders

An extension to Leaflet that contains configurations for various Korean tile providers.

Usage

//add Naver Street Layer to map.
new L.TileLayer.KoreaProvider('NaverMap.Street').addTo(map);
//add Naver Street Layer to map.
L.tileLayer.koreaProvider('NaverMap.Street').addTo(map);

This library provides a prefilled layer control, so you can just provide an array of strings:

var baseLayers = {
	'Naver Street Map': L.tileLayer.koreaProvider('NaverMap.Street').addTo(map),
	'Naver Satellite Map' : L.tileLayer.koreaProvider('NaverMap.Satellite')
};

var overlayLayers = {
	'Naver Hybrid Map' : L.tileLayer.koreaProvider('NaverMap.Hybrid'),
	'Naver Cadastral Map' : L.tileLayer.koreaProvider('NaverMap.Cadastral')
};		

var layerControl = L.control.layers.provided(baseLayers, overlays).addTo(map);

//you can still add your own afterwards with
layerControl.addBaseLayer(layer, name);
var baseLayers = {
	'Naver Street Map': L.tileLayer.koreaProvider('NaverMap.Street').addTo(map),
	'Naver Satellite Map': L.tileLayer.koreaProvider('NaverMap.Satellite'),
	'Naver Hybrid Map': L.tileLayer.koreaProvider('NaverMap.Hybrid'),
	'Naver Cadastral Map': L.tileLayer.koreaProvider('NaverMap.Cadastral', {opacity : 1.0})
};

var overlayLayers = {
	'Naver Cadastral Map': L.tileLayer.koreaProvider('NaverMap.Cadastral')
};

L.control.layers(baseLayers, overlayLayers, {collapsed: false}).addTo(map);

Example

var map = L.map('map', {
  center: new L.LatLng(38, 127),
  zoom: 1, 
  crs: L.Proj.CRS.Naver
});

var baseLayers = {
	'Naver Street Map': L.tileLayer.koreaProvider('NaverMap.Street').addTo(map),
	'Naver Satellite Map' : L.tileLayer.koreaProvider('NaverMap.Satellite')
};

var overlayLayers = {
	'Naver Hybrid Map' : L.tileLayer.koreaProvider('NaverMap.Hybrid'),
	'Naver Cadastral Map' : L.tileLayer.koreaProvider('NaverMap.Cadastral')
};

L.control.layers(baseLayers, overlayLayers, {collapsed: false}).addTo(map);

There are more examples at the examples folder like below.

./examples/indexNaver.html
./examples/indexDaum.html
./examples/indexVWorld.html

NaverMap and DaumMap uses a local Coordinate Reference Systems (CRS), which is EPSG:5179 and EPSG:5181. Therefore, it is not compatible with other international tile providers that are based on EPSG:4326 or EPSG:900913.

On the contrary, VWorld uses EPSG:900913 as its CRS, so it can be used with other tile providers (e.g. googlemap, OpenStreetMap, OpenWeatherMap, etc.) that are using the same CRS (i.e. EPSG:4326 or EPSG:900913).

Live Demo

Korean Map Tiles on Leaflet

Providers

Current options suitable for basemaps are:

  • NaverMap
    • NaverMap.Street
    • NaverMap.Satellite
  • DaumMap
    • DaumMap.Street
    • DaumMap.Satellite
  • VWorld
    • VWorld.Street
    • VWorld.Satellite
    • VWorld.Gray
    • VWorld.Midnight

Current options suitable for overlays are:

  • NaverMap
    • NaverMap.Physical
    • NaverMap.Hybrid
    • NaverMap.Cadastral
    • NaverMap.Bicycle
    • NaverMap.Traffic
  • DaumMap
    • DaumMap.Hybrid
    • DaumMap.Physical
    • DaumMap.Cadastral
    • DaumMap.Bicycle
    • DaumMap.Traffic
  • VWorld
    • VWorld.Hybrid

This work was inspired from http://plugins.qgis.org/plugins/tmsforkorea, https://github.com/leaflet-extras/leaflet-providers, and https://github.com/kartena/Proj4Leaflet.

leaflet.koreantmsproviders's People

Contributors

tontita avatar joongtang avatar

Watchers

James Cloos avatar

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.