Atlaslog
Atlaslog / Leaflet / API reference / Point
Leaflet · API reference

Point

Quick answer

L.point stores a pixel coordinate with x growing right and y growing down, carrying no geographic meaning at all. Layers, panes and mouse handlers exchange Point values, and its arithmetic methods return new objects so chained calls stay safe. The optional round flag snaps both components at construction time.

Last verified 2026-11-03 · Leaflet 1.9.4 · Cite this page
L.point( x , y , round ?) → Point
Key points
Example
var latlng = L.latLng(39.907359, 116.391263);

/* 图层像素坐标,随缩放变化 */
var p = map.latLngToLayerPoint(latlng);

var labelPos = p.add(L.point(16, -16));

var label = L.marker(map.layerPointToLatLng(labelPos), {
  icon: L.divIcon({ className: 'poi-label', html: '站点 A' })
}).addTo(map);
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). Point. https://www.jingweizhi.com/en/leaflet/api/point.html (accessed 2026-11-03).