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:
- is html 5 canvas hardware accelerated on android chrome beta?
- phone android html5 hardware acceleration - canvas
html5 interesting not expect native performance on every device yet, better in few years.
Comments
Post a Comment