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.Proj.TileLayer.TMS.Provider('NaverMap.Street').addTo(map);
//add Naver Street Layer to map.
L.Proj.TileLayer.TMS.provider('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.Proj.TileLayer.TMS.provider('NaverMap.Street').addTo(map),
	'Naver Satellite Map' : L.Proj.TileLayer.TMS.provider('NaverMap.Satellite')
};

var overlayLayers = {
	'Naver Hybrid Map' : L.Proj.TileLayer.TMS.provider('NaverMap.Hybrid'),
	'Naver Cadastral Map' : L.Proj.TileLayer.TMS.provider('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.Proj.TileLayer.TMS.provider('NaverMap.Street').addTo(map),
	'Naver Satellite Map': L.Proj.TileLayer.TMS.provider('NaverMap.Satellite'),
	'Naver Hybrid Map': L.Proj.TileLayer.TMS.provider('NaverMap.Hybrid'),
	'Naver Cadastral Map': L.Proj.TileLayer.TMS.provider('NaverMap.Cadastral', null, {opacity : 1.0})
};

var overlayLayers = {
	'Naver Cadastral Map': L.Proj.TileLayer.TMS.provider('NaverMap.Cadastral')
};

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

Example

var map = L.map('map', {
	crs: L.Proj.CRS.TMS.Naver, 
	continuousWorld: true,
	worldCopyJump: false,
	zoomControl: true
});

var baseLayers = {
	'Naver Street Map': L.Proj.TileLayer.TMS.provider('NaverMap.Street').addTo(map),
	'Naver Satellite Map' : L.Proj.TileLayer.TMS.provider('NaverMap.Satellite')
};

var overlayLayers = {
	'Naver Hybrid Map' : L.Proj.TileLayer.TMS.provider('NaverMap.Hybrid'),
	'Naver Cadastral Map' : L.Proj.TileLayer.TMS.provider('NaverMap.Cadastral')
};

L.control.layers(baseLayers, overlayLayers, {collapsed: false}).addTo(map);
map.setView([38, 127], 0);

There are more examples at the examples folder like below.

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

NaverMap uses a local Coordinate Reference Systems (CRS), which is EPSG:5179. 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
    • NaverMap.Hybrid
    • NaverMap.Cadastral
  • VWorld
    • VWorld.Street
    • VWorld.Satellite

Current options suitable for overlays are:

  • NaverMap
    • NaverMap.Cadastral
  • 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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

leaflet.koreantmsproviders's Issues

VWorld seems to be broken

VWorld tiles aren't loading any more. Not sure if it is a temporary issue or if they changed something permanently.

How to install this plugin?

We used google maps since forever but now we have a Korean client that asked us to use map tiles from a Korean provider.

I'm trying to see if I can use this plugin but I don't see clear instructions on how to include it on my code. Can someone help? Thanks

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.