Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Using leaflet, you can draw on a given map by adding a Canvas layer. Some instructions are given here, http://leaflet.cloudmade.com/reference.html#tilelayer-canvas

var canvasTiles = new L.TileLayer.Canvas();

canvasTiles.drawTile = function(canvas, tilePoint, zoom) {
    var ctx = canvas.getContext('2d');
    // draw something on the tile canvas

However, I'd like to to draw at a specific lat-long location on the map, can that be done?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You should look at defining a custom layer: http://leaflet.cloudmade.com/reference.html#ilayer

share|improve this answer

So canvas layer might be a bit of overkill to you it might make sense to look at marker or circle marker if you do need to use a canvas layer I believe you have to transform the latlng into the layer coordinates system, and then use the canvas layer functions to map it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.