openlayers - Performance issues in large vector layer rendering using canvas renderer of leaflet -


i'm trying render map contains around 3000 polygons through canvas renderer in leaflet, working fine on pc slow(and crashes sometimes) when test on android device or i-pod. i've tried render openlayers 2 , openlayers 3 these working slow. noteworthy when used above 3 rendering engines render map of around 800 polygons, leaflet worked fastest among 3 hangs , crashes when number increased 3000. i'm using wkt format input data. leaflet code given below-

var wkt = new wkt.wkt();         var geom;         var feature;         var typewisedata; (var type in alldata){     typewisedata = alldata[type];     (var i=0; i<typewisedata.length;i++){         geom = typewisedata[i]['geometry'];         if (geom){             try {                 wkt.read(geom);                 feature = wkt.toobject();                 feature.addto(map);             }             catch(e){                 alert(e.message);             }          }     } } 

can please suggest me solution problem? should use other rendering engine? should use other input data format (like geojson)? thanks.

first doubt cause input format. browsers may use hardware acceleration behind scenes canvas element, if not experience performance degradation.

canvas->browser->os->hardware, depend on lot of parameters...

i not expert in android issue applies browser/device combination. see these links:

html5 interesting not expect native performance on every device yet, better in few years.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -