Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make getVisibleLocations() . #67

Open
sagarpreet-chadha opened this issue Apr 7, 2019 · 1 comment
Open

Make getVisibleLocations() . #67

sagarpreet-chadha opened this issue Apr 7, 2019 · 1 comment

Comments

@sagarpreet-chadha
Copy link
Collaborator

sagarpreet-chadha commented Apr 7, 2019

locations_markers_array - maybe we should rename this getVisibleLocations()?
SourceUrl_markers_array is this the same as above but for remote locations? What if we instead just added a property to each location like source: 'remote' and then only used the above getVisibleLocations(); method instead of having 2?

@jywarren ,
To make code more modular --- we have implemented separate listeners (panning and zooming) for Local data and Remote data , hence we have made separate arrays - locations_markers_array and SourceUrl_markers_array in order to avoid Race Condition between the different listeners .

Hence we have these 2 functions that are useful :

function return_locations_markers_array(){

function return_SourceUrl_markers_array(){

We can make a function getVisibleLocations() which basically combines the data from these 2 arrays and returns it in the form :

Screenshot 2019-04-07 at 4 54 05 PM

Now for all future purposes , we can use only this function . What do you think ?

@jywarren
Copy link
Member

jywarren commented Apr 7, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants