Open sagarpreet-chadha opened 5 years ago
This is super! So you think a lot of the failures on that page are due to multiple loading maps on the same page?
On Tue, Jan 29, 2019 at 9:06 AM Sagarpreet Chadha notifications@github.com wrote:
This page : https://publiclab.org/wiki/inline-maps shows the documentation of all the inline maps that we have .
All Inline maps use the same partial _leaflet.html.erb except people-inline-map which uses _peopleleaflet.html.erb .
-
Remove HASH from URL when using people-inline-map -> No sense of using URL HASH when having more than one inline map on a page .
Multiple dependencies being loaded when more than 1 inline map used .
Documentation needs to be updated on the page - https://publiclab.org/wiki/inline-maps .
Write test : Leaflet Map is loaded --- check if <div class="leaflet-map"... is present or not . When 2 inline maps are used then 2 such div's should be present . Add fixture data which calls self.notes_map_by_tag function in nodes_shared.rb to demonstrate the test .
Another test : Check if the marker is being loaded on the map ! This can be done by checking if <img class="leaflet-marker-shadow leaflet-zoom-animated"... which represents marker is present on page or not .
Thanks 😄 !
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4722, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJwqQLq3WAwn11nas-UOCGPqYzLpLks5vIDk2gaJpZM4aX6I5 .
The errors currently are due to 3 reason :
1.) New API is not used (bounding rectangle API) , which is solved in #4725 . 2.) Use of Full Hash URL , which is also solved in #4725 .
3.) The 3rd error is weird , it is because this script is not getting loaded :
<%= javascript_include_tag('https://unpkg.com/esri-leaflet@2.2.3/dist/esri-leaflet.js') %> <%= javascript_include_tag('https://unpkg.com/esri-leaflet-renderers@2.0.6') %>
Hence , giving this error :
This error is only in inline maps (other maps are working fine) AND is not there in localhost (hence i cannot replicate this error) !
Just going to reopen this to ask if there's anything else we need to do to get the maps on this page working?
Oh, hm,
Uncaught TypeError: Cannot read property 'featureLayer' of undefined
at wisconsinLayer (eval at <anonymous> (application-63699fb814392c5696c58b662202dbe85aaf4da5c66ced606772a14e47cf285e.js:350), <anonymous>:29409:31)
at setupLEL (application-63699fb814392c5696c58b662202dbe85aaf4da5c66ced606772a14e47cf285e.js:37272)
at eval (eval at <anonymous> (application-63699fb814392c5696c58b662202dbe85aaf4da5c66ced606772a14e47cf285e.js:350),
And see this (pan the maps once to load data , will fix this asap) : https://publiclab.org/notes/sagarpreet/01-30-2019/inline-map-testing
=> Working fine on NOTE but giving the above error on WIKI .
Oh this is great! 2 things --
Great work, just a few more steps here, Sagarpreet!
Hi, I'm going to open this one more time, sorry @sagarpreet-chadha ! I still am seeing some errors here:
https://publiclab.org/wiki/inline-maps
VM297:29409 Uncaught TypeError: Cannot read property 'featureLayer' of undefined
at wisconsinLayer
Could you take a look? Thank you!
This page : https://publiclab.org/wiki/inline-maps shows the documentation of all the inline maps that we have .
All Inline maps use the same partial
_leaflet.html.erb
except people-inline-map which uses_peopleleaflet.html.erb
.[ ] Remove HASH from URL when using people-inline-map -> No sense of using URL HASH when having more than one inline map on a page .
[ ] Multiple dependencies being loaded when more than 1 inline map used .
[ ] Documentation needs to be updated on the page - https://publiclab.org/wiki/inline-maps .
[ ] Write test : Leaflet Map is loaded --- check if
<div class="leaflet-map"...
is present or not . When 2 inline maps are used then 2 such div's should be present . Add fixture data which callsself.notes_map_by_tag
function innodes_shared.rb
to demonstrate the test .[ ] Another test : Check if the marker is being loaded on the map ! This can be done by checking if
<img class="leaflet-marker-shadow leaflet-zoom-animated"...
which represents marker is present on page or not .[ ] Use of new taglocation API ! (with 4 coordinates in input instead of current 2 !) [IMPORANT/PRIORITY]
[ ] Increase random number generator range from which map instance name is made--> name of map instance uses number in range [1 ,100] , more map on 1 page causes names to clash !
Thanks 😄 !