new pretty marker icons

This commit is contained in:
Mourner 2011-01-12 16:51:54 +02:00
parent 0e62b98c3a
commit 8bbe9940c0
4 changed files with 8 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
dist/images/marker.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -5,8 +5,8 @@ L.Icon = L.Class.extend({
//iconSize: new L.Point(24, 37),
//shadowSize: new L.Point(42, 37),
iconAnchor: new L.Point(12, 37),
popupAnchor: new L.Point(0, -29),
iconAnchor: new L.Point(13, 41),
popupAnchor: new L.Point(0, -33),
initialize: function(iconUrl) {
if (iconUrl) {

View File

@ -1,3 +1,8 @@
/*
* L.Marker is used to display clickable/draggable icons on the map.
*/
L.Marker = L.Class.extend({
includes: L.Mixin.Events,
@ -43,7 +48,7 @@ L.Marker = L.Class.extend({
},
_reset: function() {
var pos = this._map.latLngToLayerPoint(this._latlng);
var pos = this._map.latLngToLayerPoint(this._latlng).round();
L.DomUtil.setPosition(this._icon, pos);
L.DomUtil.setPosition(this._shadow, pos);