@@ -1110,7 +1110,14 @@ function addMarkers(map, df, group, clusterOptions, clusterId, markerFunc) {
1110
1110
this . layerManager . addLayer ( marker , "marker" , thisId , thisGroup ) ;
1111
1111
}
1112
1112
var popup = df . get ( i , "popup" ) ;
1113
- if ( popup !== null ) marker . bindPopup ( popup ) ;
1113
+ var popupOptions = df . get ( i , "popupOptions" ) ;
1114
+ if ( popup !== null ) {
1115
+ if ( popupOptions !== null ) {
1116
+ marker . bindPopup ( popup , popupOptions ) ;
1117
+ } else {
1118
+ marker . bindPopup ( popup ) ;
1119
+ }
1120
+ }
1114
1121
var label = df . get ( i , "label" ) ;
1115
1122
var labelOptions = df . get ( i , "labelOptions" ) ;
1116
1123
if ( label !== null ) {
@@ -1140,7 +1147,7 @@ function addMarkers(map, df, group, clusterOptions, clusterId, markerFunc) {
1140
1147
} ) . call ( map ) ;
1141
1148
}
1142
1149
1143
- methods . addMarkers = function ( lat , lng , icon , layerId , group , options , popup , clusterOptions , clusterId , label , labelOptions ) {
1150
+ methods . addMarkers = function ( lat , lng , icon , layerId , group , options , popup , popupOptions , clusterOptions , clusterId , label , labelOptions ) {
1144
1151
var icondf = void 0 ;
1145
1152
var getIcon = void 0 ;
1146
1153
@@ -1185,7 +1192,7 @@ methods.addMarkers = function (lat, lng, icon, layerId, group, options, popup, c
1185
1192
} ;
1186
1193
}
1187
1194
1188
- var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1195
+ var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1189
1196
1190
1197
if ( icon ) icondf . effectiveLength = df . nrow ( ) ;
1191
1198
@@ -1196,7 +1203,7 @@ methods.addMarkers = function (lat, lng, icon, layerId, group, options, popup, c
1196
1203
} ) ;
1197
1204
} ;
1198
1205
1199
- methods . addAwesomeMarkers = function ( lat , lng , icon , layerId , group , options , popup , clusterOptions , clusterId , label , labelOptions ) {
1206
+ methods . addAwesomeMarkers = function ( lat , lng , icon , layerId , group , options , popup , popupOptions , clusterOptions , clusterId , label , labelOptions ) {
1200
1207
var icondf = void 0 ;
1201
1208
var getIcon = void 0 ;
1202
1209
if ( icon ) {
@@ -1216,7 +1223,7 @@ methods.addAwesomeMarkers = function (lat, lng, icon, layerId, group, options, p
1216
1223
} ;
1217
1224
}
1218
1225
1219
- var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1226
+ var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1220
1227
1221
1228
if ( icon ) icondf . effectiveLength = df . nrow ( ) ;
1222
1229
@@ -1236,7 +1243,14 @@ function addLayers(map, category, df, layerFunc) {
1236
1243
this . layerManager . addLayer ( layer , category , thisId , thisGroup ) ;
1237
1244
if ( layer . bindPopup ) {
1238
1245
var popup = df . get ( i , "popup" ) ;
1239
- if ( popup !== null ) layer . bindPopup ( popup ) ;
1246
+ var popupOptions = df . get ( i , "popupOptions" ) ;
1247
+ if ( popup !== null ) {
1248
+ if ( popupOptions !== null ) {
1249
+ layer . bindPopup ( popup , popupOptions ) ;
1250
+ } else {
1251
+ layer . bindPopup ( popup ) ;
1252
+ }
1253
+ }
1240
1254
}
1241
1255
if ( layer . bindLabel ) {
1242
1256
var label = df . get ( i , "label" ) ;
@@ -1260,16 +1274,16 @@ function addLayers(map, category, df, layerFunc) {
1260
1274
}
1261
1275
}
1262
1276
1263
- methods . addCircles = function ( lat , lng , radius , layerId , group , options , popup , label , labelOptions ) {
1264
- var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "radius" , radius ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1277
+ methods . addCircles = function ( lat , lng , radius , layerId , group , options , popup , popupOptions , label , labelOptions ) {
1278
+ var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "radius" , radius ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1265
1279
1266
1280
addLayers ( this , "shape" , df , function ( df , i ) {
1267
1281
return _leaflet2 . default . circle ( [ df . get ( i , "lat" ) , df . get ( i , "lng" ) ] , df . get ( i , "radius" ) , df . get ( i ) ) ;
1268
1282
} ) ;
1269
1283
} ;
1270
1284
1271
- methods . addCircleMarkers = function ( lat , lng , radius , layerId , group , options , clusterOptions , clusterId , popup , label , labelOptions ) {
1272
- var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "radius" , radius ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1285
+ methods . addCircleMarkers = function ( lat , lng , radius , layerId , group , options , clusterOptions , clusterId , popup , popupOptions , label , labelOptions ) {
1286
+ var df = new _dataframe2 . default ( ) . col ( "lat" , lat ) . col ( "lng" , lng ) . col ( "radius" , radius ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1273
1287
1274
1288
addMarkers ( this , df , group , clusterOptions , clusterId , function ( df , i ) {
1275
1289
return _leaflet2 . default . circleMarker ( [ df . get ( i , "lat" ) , df . get ( i , "lng" ) ] , df . get ( i ) ) ;
@@ -1280,8 +1294,8 @@ methods.addCircleMarkers = function (lat, lng, radius, layerId, group, options,
1280
1294
* @param lat Array of arrays of latitude coordinates for polylines
1281
1295
* @param lng Array of arrays of longitude coordinates for polylines
1282
1296
*/
1283
- methods . addPolylines = function ( polygons , layerId , group , options , popup , label , labelOptions ) {
1284
- var df = new _dataframe2 . default ( ) . col ( "shapes" , polygons ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1297
+ methods . addPolylines = function ( polygons , layerId , group , options , popup , popupOptions , label , labelOptions ) {
1298
+ var df = new _dataframe2 . default ( ) . col ( "shapes" , polygons ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1285
1299
1286
1300
addLayers ( this , "shape" , df , function ( df , i ) {
1287
1301
var shape = df . get ( i , "shapes" ) [ 0 ] ;
@@ -1320,8 +1334,8 @@ methods.clearShapes = function () {
1320
1334
this . layerManager . clearLayers ( "shape" ) ;
1321
1335
} ;
1322
1336
1323
- methods . addRectangles = function ( lat1 , lng1 , lat2 , lng2 , layerId , group , options , popup , label , labelOptions ) {
1324
- var df = new _dataframe2 . default ( ) . col ( "lat1" , lat1 ) . col ( "lng1" , lng1 ) . col ( "lat2" , lat2 ) . col ( "lng2" , lng2 ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1337
+ methods . addRectangles = function ( lat1 , lng1 , lat2 , lng2 , layerId , group , options , popup , popupOptions , label , labelOptions ) {
1338
+ var df = new _dataframe2 . default ( ) . col ( "lat1" , lat1 ) . col ( "lng1" , lng1 ) . col ( "lat2" , lat2 ) . col ( "lng2" , lng2 ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1325
1339
1326
1340
addLayers ( this , "shape" , df , function ( df , i ) {
1327
1341
return _leaflet2 . default . rectangle ( [ [ df . get ( i , "lat1" ) , df . get ( i , "lng1" ) ] , [ df . get ( i , "lat2" ) , df . get ( i , "lng2" ) ] ] , df . get ( i ) ) ;
@@ -1332,8 +1346,8 @@ methods.addRectangles = function (lat1, lng1, lat2, lng2, layerId, group, option
1332
1346
* @param lat Array of arrays of latitude coordinates for polygons
1333
1347
* @param lng Array of arrays of longitude coordinates for polygons
1334
1348
*/
1335
- methods . addPolygons = function ( polygons , layerId , group , options , popup , label , labelOptions ) {
1336
- var df = new _dataframe2 . default ( ) . col ( "shapes" , polygons ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "label" , label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1349
+ methods . addPolygons = function ( polygons , layerId , group , options , popup , popupOptions , label , labelOptions ) {
1350
+ var df = new _dataframe2 . default ( ) . col ( "shapes" , polygons ) . col ( "layerId" , layerId ) . col ( "group" , group ) . col ( "popup" , popup ) . col ( "popupOptions" , popupOptions ) . col ( " label", label ) . col ( "labelOptions" , labelOptions ) . cbind ( options ) ;
1337
1351
1338
1352
addLayers ( this , "shape" , df , function ( df , i ) {
1339
1353
var shapes = df . get ( i , "shapes" ) ;
0 commit comments