Open sagarpreet-chadha opened 5 years ago
Hi @jywarren , I have changed the LBL declaration syntax in PR : https://github.com/publiclab/leaflet-blurred-location/pull/195 . The current declaration of LBLD is pretty simple 😄 :
var blurredLocationDisplay = new BlurredLocationDisplay(options_display);
Should we do any change to LBLD as well ? Kindly elaborate this issue . Thanks !
Yeah i think it's fine - however does it set up a Leaflet map, or how do we connect it to a leaflet map? Especially, say, if we have more than one on a given page?
On Mon, Apr 8, 2019 at 1:23 PM Sagarpreet Chadha notifications@github.com wrote:
Hi @jywarren https://github.com/jywarren , I have changed the LBL declaration syntax in PR : publiclab/leaflet-blurred-location#195 https://github.com/publiclab/leaflet-blurred-location/pull/195 . The current declaration of LBLD is pretty simple 😄 :
var blurredLocationDisplay = new BlurredLocationDisplay(options_display);
Should we do any change to LBLD as well ? Kindly elaborate this issue . Thanks !
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/leaflet-blurred-location-display/issues/66#issuecomment-480924800, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ_ISncMfZp3X4MrLzLqmxdGTQO9iks5ve3r_gaJpZM4cgpFL .
So after https://github.com/publiclab/leaflet-blurred-location/pull/195 gets merged , It would be a 3 step process to add LBLD to maps :
1.) Make standard leaflet object :
var map123 = L.map('map').setView([23,77] , 3) ;
2.) Pass this leaflet object to LBL :
var blurredLocation = new BlurredLocation(options) ;
blurredLocation.addTo(map123) ;
3.) Pass LBL object in options_display
to LBLD object (no need to pass leaflet map object) :
var blurredLocationDisplay = new BlurredLocationDisplay(options_display);
I will write a detailed documentation explaining this in Readme
:)
From #64 ,
Hi @jywarren ,
So currently we have this
options.locations
property which takes an array of coordinates as input and then performs the normal LBLD functions on them .We are making only one LBL and one LBLD object currently . We pass the
map
object as options to theLBL object
, and then thisLBL object
inoptions_display
toLBLD object
.I think
options.locations
property gives user more flexibility . So if one do not want to pass theirAPI URL
andJSON parser
into the LBLD library (as we do not support XML parsing and others) , so instead one can pass the coordinates array (locations array) directly into the LBLD object . Makes sense ?Kindly elaborate more on this issue :smile: ! Thanks !