Added package.json
This commit is contained in:
parent
b47ab9cc36
commit
80e5198b32
2 changed files with 44 additions and 4 deletions
20
js/geocsv.js
20
js/geocsv.js
|
|
@ -80,6 +80,12 @@ var GeoCSV = {
|
|||
* Methods related to locating and presenting data on the map
|
||||
*/
|
||||
GIS: {
|
||||
/**
|
||||
* the relative or absolute URL of the place where map pin images may be
|
||||
* fetched from.
|
||||
*/
|
||||
iconUrlBase: "img/map-pins/",
|
||||
|
||||
/**
|
||||
* Return an appropriate pin image name for this `record`.
|
||||
*/
|
||||
|
|
@ -124,13 +130,13 @@ var GeoCSV = {
|
|||
if ( !isNaN( lat) && !isNaN( lng)) {
|
||||
var pin = L.icon( {iconAnchor: [16, 41],
|
||||
iconSize: [32, 42],
|
||||
iconUrl: "img/map-pins/" +
|
||||
iconUrl: this.iconUrlBase +
|
||||
this.pinImage( record) +
|
||||
".png",
|
||||
riseOnHover: true,
|
||||
shadowAnchor: [16, 23],
|
||||
shadowSize: [57, 24],
|
||||
shadowUrl: "img/map-pins/shadow_pin.png"});
|
||||
shadowUrl: this.iconUrlBase + "shadow_pin.png"});
|
||||
var marker = L.marker( L.latLng( lat, lng),
|
||||
{icon: pin, title: record["name"]});
|
||||
marker.bindPopup( this.popupContent( record));
|
||||
|
|
@ -184,8 +190,6 @@ var GeoCSV = {
|
|||
view.fitBounds( [[ maxLat, maxLng],
|
||||
[ minLat, minLng]]);
|
||||
}
|
||||
//return [ minLat + ( ( maxLat - minLat) / 2),
|
||||
// minLng + ( ( maxLng - minLng) / 2)];
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -315,5 +319,13 @@ var GeoCSV = {
|
|||
this.Notify.error( error);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the base address from which to serve icon (map pin) URLs to thia
|
||||
* `iconUrlBase` value.
|
||||
*/
|
||||
setIconUrlBase( iconUrlBase) {
|
||||
this.GIS.iconUrlBase = String( iconUrlBase);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue