Back

Data loading

Simple example that illustrates how data returned from server can be loaded incrementally as bounds of the visible area are supplied in the request.

Documentation Open in JSFiddle
Start Free Trial Purchase

HTML

HTML
<script src="https://cdn.zoomcharts-cloud.com/1/nightly/zoomcharts.js"></script>

<div id="demo"></div>

CSS

CSS
//No CSS for this example 

JavaScript

JavaScript

    // simulated data loading, this would usually be done on server
    var data = [{ "coordinates": ["24.001522064208984", "56.9391100341154"], "type": "point", "id": "LUKOIL at Valgales 1", "name": "LUKOIL at Valgales 1" }, { "coordinates": ["23.176732063293457", "56.95729641767575"], "type": "point", "id": "LUKOIL at Zemgales iela 25", "name": "LUKOIL at Zemgales iela 25" }, { "coordinates": ["26.54567241668701", "55.89458436765967"], "type": "point", "id": "LUKOIL at Višķu iela 17", "name": "LUKOIL at Višķu iela 17" }, { "coordinates": ["24.360251426696777", "57.74374737648046"], "type": "point", "id": "LUKOIL at Vidzemes iela 29", "name": "LUKOIL at Vidzemes iela 29" }, { "coordinates": ["25.291600227355957", "57.32002206009211"], "type": "point", "id": "LUKOIL at Valmieras iela 12", "name": "LUKOIL at Valmieras iela 12" }, { "coordinates": ["24.173312187194824", "56.993537378463444"], "type": "point", "id": "LUKOIL at Ķīšezera iela 31", "name": "LUKOIL at Ķīšezera iela 31" }, { "coordinates": ["24.56264019012451", "56.81912031332317"], "type": "point", "id": "LUKOIL at Rīgas iela 116", "name": "LUKOIL at Rīgas iela 116" }, { "coordinates": ["24.049640893936157", "56.927302862205536"], "type": "point", "id": "LUKOIL at Ulmaņa gatve 67", "name": "LUKOIL at Ulmaņa gatve 67" }, { "coordinates": ["27.244741916656494", "57.14145540165638"], "type": "point", "id": "LUKOIL at Stacijas iela 13", "name": "LUKOIL at Stacijas iela 13" }, { "coordinates": ["22.568986415863037", "56.68322610989686"], "type": "point", "id": "LUKOIL at Skorpions", "name": "LUKOIL at Skorpions" }, { "coordinates": ["24.135278463363647", "56.94709546387292"], "type": "point", "id": "LUKOIL at Satekles 6", "name": "LUKOIL at Satekles 6" }, { "coordinates": ["24.179792404174805", "56.9226246198157"], "type": "point", "id": "LUKOIL at Salaspils 4", "name": "LUKOIL at Salaspils 4" }, { "coordinates": ["24.20283794403076", "56.93491034047797"], "type": "point", "id": "LUKOIL at Saharova 10", "name": "LUKOIL at Saharova 10" }, { "coordinates": ["23.713560104370117", "56.636996637603445"], "type": "point", "id": "LUKOIL at Rūpniecības iela 20", "name": "LUKOIL at Rūpniecības iela 20" }, { "coordinates": ["26.20591163635254", "56.858979813150135"], "type": "point", "id": "LUKOIL at Rūpniecības iela 19", "name": "LUKOIL at Rūpniecības iela 19" }, { "coordinates": ["26.933798789978027", "56.56475593258964"], "type": "point", "id": "LUKOIL at Rīgas iela 52", "name": "LUKOIL at Rīgas iela 52" }, { "coordinates": ["23.991565704345703", "56.91954450553871"], "type": "point", "id": "LUKOIL at Pleskodāle", "name": "LUKOIL at Pleskodāle" }, { "coordinates": ["25.715389251708984", "56.63248859045706"], "type": "point", "id": "LUKOIL at Pļaviņas", "name": "LUKOIL at Pļaviņas" }, { "coordinates": ["24.118927717208862", "56.91639385951789"], "type": "point", "id": "LUKOIL at Mūkusalas iela 78", "name": "LUKOIL at Mūkusalas iela 78" }, { "coordinates": ["24.106546640396118", "56.92935782457055"], "type": "point", "id": "LUKOIL at Mūkusalas iela 59", "name": "LUKOIL at Mūkusalas iela 59" }, { "coordinates": ["24.391450881958008", "57.22513803698574"], "type": "point", "id": "LUKOIL at Mazžvīguļi", "name": "LUKOIL at Mazžvīguļi" }, { "coordinates": ["24.24686908721924", "56.81002978841649"], "type": "point", "id": "LUKOIL at Mazsvilpji", "name": "LUKOIL at Mazsvilpji" }, { "coordinates": ["25.404188632965088", "57.536998197555036"], "type": "point", "id": "LUKOIL at Matīšu 33", "name": "LUKOIL at Matīšu 33" }, { "coordinates": ["24.24086093902588", "56.94221194318144"], "type": "point", "id": "LUKOIL at Lubānas iela 129", "name": "LUKOIL at Lubānas iela 129" }, { "coordinates": ["24.82384443283081", "57.13826529566585"], "type": "point", "id": "LUKOIL at Lorēni", "name": "LUKOIL at Lorēni" }, { "coordinates": ["23.723602294921875", "56.62424998206508"], "type": "point", "id": "LUKOIL at Lietuvas šoseja 72", "name": "LUKOIL at Lietuvas šoseja 72" }, { "coordinates": ["25.873939990997314", "56.5099282238456"], "type": "point", "id": "LUKOIL at Latgales iela 42", "name": "LUKOIL at Latgales iela 42" }, { "coordinates": ["24.42934513092041", "57.38791109422681"], "type": "point", "id": "LUKOIL at Laiciemkursīši", "name": "LUKOIL at Laiciemkursīši" }, { "coordinates": ["21.61460280418396", "57.396901453097215"], "type": "point", "id": "LUKOIL at Kurzemes iela 59", "name": "LUKOIL at Kurzemes iela 59" }, { "coordinates": ["24.14566397666931", "56.93344399460471"], "type": "point", "id": "LUKOIL at Krasta iela 50", "name": "LUKOIL at Krasta iela 50" }, { "coordinates": ["21.005929112434387", "56.52018931268746"], "type": "point", "id": "LUKOIL at Kapsētas iela 24/26", "name": "LUKOIL at Kapsētas iela 24/26" }, { "coordinates": ["21.567245721817017", "57.38215148064372"], "type": "point", "id": "LUKOIL at Inženieru iela 2", "name": "LUKOIL at Inženieru iela 2" }, { "coordinates": ["27.04180598258972", "57.41389905486723"], "type": "point", "id": "LUKOIL at Gulbenes iela 1", "name": "LUKOIL at Gulbenes iela 1" }, { "coordinates": ["21.98590636253357", "56.958712102315225"], "type": "point", "id": "LUKOIL at Graudu iela 9", "name": "LUKOIL at Graudu iela 9" }, { "coordinates": ["24.2171448469162", "56.912379035814205"], "type": "point", "id": " LUKOIL at Granīta iela 7", "name": " LUKOIL at Granīta iela 7" }, { "coordinates": ["21.015268564224243", "56.485331149943086"], "type": "point", "id": "LUKOIL at Ganību iela 180", "name": "LUKOIL at Ganību iela 180" }, { "coordinates": ["24.046770930290222", "57.02927890628548"], "type": "point", "id": "LUKOIL at Gaigalas iela 19", "name": "LUKOIL at Gaigalas iela 19" }, { "coordinates": ["24.18916404247284", "56.9576591188643"], "type": "point", "id": "LUKOIL at Astras iela 7", "name": "LUKOIL at Astras iela 7" }, { "coordinates": ["24.117683172225952", "57.03387663283694"], "type": "point", "id": "LUKOIL at Emmas iela 45", "name": "LUKOIL at Emmas iela 45" }, { "coordinates": ["24.18367624282837", "56.9818731351111"], "type": "point", "id": "LUKOIL at Džutas iela 16", "name": "LUKOIL at Džutas iela 16" }, { "coordinates": ["24.181305170059204", "56.41832868723174"], "type": "point", "id": "LUKOIL at Dīči 1", "name": "LUKOIL at Dīči 1" }, { "coordinates": ["24.18142318725586", "56.93884079965062"], "type": "point", "id": "LUKOIL at Dārzciema iela 64", "name": "LUKOIL at Dārzciema iela 64" }, { "coordinates": ["24.246740341186523", "56.8822819360832"], "type": "point", "id": "LUKOIL at Daugavpils iela 3", "name": "LUKOIL at Daugavpils iela 3" }, { "coordinates": ["27.329800128936768", "56.49867246012096"], "type": "point", "id": "LUKOIL at Daugavpils iela 3", "name": "LUKOIL at Daugavpils iela 3" }, { "coordinates": ["24.729301929473877", "57.5122962896932"], "type": "point", "id": "LUKOIL at Cēsu iela 32", "name": "LUKOIL at Cēsu iela 32" }, { "coordinates": ["24.192098379135132", "56.98122712558482"], "type": "point", "id": "LUKOIL at Brīvības iela 299", "name": "LUKOIL at Brīvības iela 299" }, { "coordinates": ["25.46028971672058", "57.50830831286797"], "type": "point", "id": "LUKOIL at Brīvnieki", "name": "LUKOIL at Brīvnieki" }, { "coordinates": ["24.2392037", "56.9581997"], "type": "point", "id": "LUKOIL at Biķernieku 120", "name": "LUKOIL at Biķernieku 120" }, { "coordinates": ["26.7410451", "57.172122"], "type": "point", "id": "LUKOIL at Baložu iela 19", "name": "LUKOIL at Baložu iela 19" }, { "coordinates": ["24.021306037902832", "56.94103558916968"], "type": "point", "id": "LUKOIL at Apūzes 47", "name": "LUKOIL at Apūzes 47" }, { "coordinates": ["24.011693000793457", "56.95894609459733"], "type": "point", "id": "LUKOIL at Anniņmuižas bulvāris 75", "name": "LUKOIL at Anniņmuižas bulvāris 75" }, { "coordinates": ["24.98591423034668", "56.61168795501293"], "type": "point", "id": "LUKOIL at Andžāni", "name": "LUKOIL at Andžāni" }, { "coordinates": ["24.952268600463867", "57.3548446204726"], "type": "point", "id": "LUKOIL at Aleta", "name": "LUKOIL at Aleta" }, { "coordinates": ["26.54720664024353", "55.8755997385357"], "type": "point", "id": "LUKOIL at 18. novembra iela 119", "name": "LUKOIL at 18. novembra iela 119" }, { "coordinates": ["24.229938983917236", "56.8277272657773"], "type": "point", "id": "Neste at Rīgas iela 24", "name": "Neste at Rīgas iela 24" }, { "coordinates": ["24.31796908378601", "57.07901796207702"], "type": "point", "id": "Neste at Rīgas gatve 5", "name": "Neste at Rīgas gatve 5" }, { "coordinates": ["24.334051609039307", "56.85145952282148"], "type": "point", "id": "Neste at Zviedru iela 1", "name": "Neste at Zviedru iela 1" }, { "coordinates": ["26.745100021362305", "57.17610969764761"], "type": "point", "id": "Neste at  Brīvības iela 68", "name": "Neste at  Brīvības iela 68" }, { "coordinates": ["27.03911304473877", "57.4295199497981"], "type": "point", "id": "Neste at Pils iela 9", "name": "Neste at Pils iela 9" }, { "coordinates": ["22.47699737548828", "56.683178965860954"], "type": "point", "id": "Neste at \"Apvedceļš\" 5", "name": "Neste at \"Apvedceļš\" 5" }, { "coordinates": ["22.495429515838623", "56.667158363252796"], "type": "point", "id": "Neste at Jelgavas iela 3", "name": "Neste at Jelgavas iela 3" }, { "coordinates": ["21.957292556762695", "56.966456466365344"], "type": "point", "id": "Neste at Sūru iela 3", "name": "Neste at Sūru iela 3" }, { "coordinates": ["24.357376098632812", "57.851693743917046"], "type": "point", "id": "Neste at Valdemāra iela 82", "name": "Neste at Valdemāra iela 82" }, { "coordinates": ["24.843435287475586", "57.142200496287856"], "type": "point", "id": "Neste at Vidzemes šoseja 4", "name": "Neste at Vidzemes šoseja 4" }, { "coordinates": ["22.582601308822632", "57.24328338907756"], "type": "point", "id": "Neste at Dundagas iela 1", "name": "Neste at Dundagas iela 1" }, { "coordinates": ["24.18736696243286", "56.40670738039508"], "type": "point", "id": "Neste at Pionieru iela 2", "name": "Neste at Pionieru iela 2" }, { "coordinates": ["24.176595211029053", "56.39936952862369"], "type": "point", "id": "Neste at Elejas iela 1", "name": "Neste at Elejas iela 1" }, { "coordinates": ["26.54223918914795", "55.87984876947009"], "type": "point", "id": "Neste at Smilšu iela 32", "name": "Neste at Smilšu iela 32" }, { "coordinates": ["26.50177001953125", "55.86510155551395"], "type": "point", "id": "Neste at Dostojevska iela 6", "name": "Neste at Dostojevska iela 6" }, { "coordinates": ["26.227229833602905", "56.86059864827643"], "type": "point", "id": "Neste at Rūpniecības iela 4", "name": "Neste at Rūpniecības iela 4" }, { "coordinates": ["24.20815944671631", "56.604720367722805"], "type": "point", "id": "Neste at Krustiņi", "name": "Neste at Krustiņi" }, { "coordinates": ["25.87275981903076", "56.493632632026554"], "type": "point", "id": "Neste at Vienības iela 1", "name": "Neste at Vienības iela 1" }, { "coordinates": ["25.850272178649902", "56.51994369461701"], "type": "point", "id": "Neste at Rīgas iela 247", "name": "Neste at Rīgas iela 247" }, { "coordinates": ["21.581740379333496", "57.387332860631716"], "type": "point", "id": "Neste at Lāčplēša iela 4", "name": "Neste at Lāčplēša iela 4" }, { "coordinates": ["21.592040061950684", "57.396306018421306"], "type": "point", "id": "Neste at Kurzemes iela 2", "name": "Neste at Kurzemes iela 2" }, { "coordinates": ["27.33724594116211", "56.516321383038935"], "type": "point", "id": "Neste at Atbrīvošanas 146", "name": "Neste at Atbrīvošanas 146" }, { "coordinates": ["25.278682708740234", "57.31577554984626"], "type": "point", "id": "Neste at Valmieras iela 4", "name": "Neste at Valmieras iela 4" }, { "coordinates": ["25.393073558807373", "57.53175159404508"], "type": "point", "id": "Neste at Rīgas iela 76", "name": "Neste at Rīgas iela 76" }, { "coordinates": ["24.60087776184082", "56.81260213739567"], "type": "point", "id": "Neste at Rīgas iela 11", "name": "Neste at Rīgas iela 11" }, { "coordinates": ["25.428661108016968", "57.531734315288816"], "type": "point", "id": "Neste at Mazā stacijas 14", "name": "Neste at Mazā stacijas 14" }, { "coordinates": ["23.70498776435852", "56.66066684238967"], "type": "point", "id": "Neste at Meiju ceļš 62", "name": "Neste at Meiju ceļš 62" }, { "coordinates": ["23.69079351425171", "56.65172074437773"], "type": "point", "id": "Neste at Atmodas iela 21", "name": "Neste at Atmodas iela 21" }, { "coordinates": ["23.760852813720703", "56.670565816747136"], "type": "point", "id": "Neste at Loka maģistrāle 2", "name": "Neste at Loka maģistrāle 2" }, { "coordinates": ["21.0346806", "56.5394524"], "type": "point", "id": "Neste at Pulvera iela 10", "name": "Neste at Pulvera iela 10" }, { "coordinates": ["21.0182875", "56.5121001"], "type": "point", "id": "Neste at Zāles laukums 7", "name": "Neste at Zāles laukums 7" }, { "coordinates": ["21.013906002044678", "56.51575314588591"], "type": "point", "id": "Neste at Raiņa iela 2", "name": "Neste at Raiņa iela 2" }, { "coordinates": ["23.151626586914062", "56.97193036289255"], "type": "point", "id": "Neste at Kurzemes iela 7", "name": "Neste at Kurzemes iela 7" }, { "coordinates": ["23.857358694076538", "56.97520495915867"], "type": "point", "id": "Neste at Viestura iela 21", "name": "Neste at Viestura iela 21" }, { "coordinates": ["23.60509157180786", "56.963684122210964"], "type": "point", "id": "Neste at Kaugurciems 83", "name": "Neste at Kaugurciems 83" }, { "coordinates": ["24.125837087631226", "56.947747917001436"], "type": "point", "id": "Neste at Dzirnavu iela 127", "name": "Neste at Dzirnavu iela 127" }, { "coordinates": ["24.17443871498108", "56.9509427244227"], "type": "point", "id": "Neste at Deglava iela 51", "name": "Neste at Deglava iela 51" }, { "coordinates": ["24.23105478286743", "56.95927368132404"], "type": "point", "id": "Neste at Biķernieku iela 115", "name": "Neste at Biķernieku iela 115" }, { "coordinates": ["24.167851209640503", "56.964526375161995"], "type": "point", "id": "Neste at Dzelzavas iela 3", "name": "Neste at Dzelzavas iela 3" }, { "coordinates": ["24.181959629058838", "56.9781869302773"], "type": "point", "id": "Neste at Brīvības iela 253", "name": "Neste at Brīvības iela 253" }, { "coordinates": ["24.115333557128906", "56.979859068412914"], "type": "point", "id": "Neste at Rankas iela 2", "name": "Neste at Rankas iela 2" }, { "coordinates": ["24.034137725830078", "56.93090336271196"], "type": "point", "id": "Neste at Lielirbes iela 30", "name": "Neste at Lielirbes iela 30" }, { "coordinates": ["24.144515991210938", "56.96821100796774"], "type": "point", "id": "Neste at Senču iela 2", "name": "Neste at Senču iela 2" }, { "coordinates": ["24.034534692764282", "56.951837923547615"], "type": "point", "id": "Neste at Jūrmalas gatve 46", "name": "Neste at Jūrmalas gatve 46" }, { "coordinates": ["24.13042902946472", "56.98817187128818"], "type": "point", "id": "Neste at Dambja iela 10", "name": "Neste at Dambja iela 10" }, { "coordinates": ["24.06926393508911", "56.95379792499761"], "type": "point", "id": "Neste at Kuldīgas iela 1", "name": "Neste at Kuldīgas iela 1" }, { "coordinates": ["24.183976650238037", "56.930833112367274"], "type": "point", "id": "Neste at Lubānas iela 64", "name": "Neste at Lubānas iela 64" }, { "coordinates": ["24.038944244384766", "56.926243136526786"], "type": "point", "id": "Neste at Upesgrīvas iela 1", "name": "Neste at Upesgrīvas iela 1" }, { "coordinates": ["24.084702730178833", "56.9095206633397"], "type": "point", "id": "Neste at Vienības gatve 144", "name": "Neste at Vienības gatve 144" }, { "coordinates": ["24.154332876205444", "56.92988471976639"], "type": "point", "id": "Neste at Krasta iela 68", "name": "Neste at Krasta iela 68" }, { "coordinates": ["24.110612869262695", "56.924814508418486"], "type": "point", "id": "Neste at Lucavsalas iela 1", "name": "Neste at Lucavsalas iela 1" }, { "coordinates": ["24.051904678344727", "56.92809324574033"], "type": "point", "id": "Neste at Ulmaņa gatve 84", "name": "Neste at Ulmaņa gatve 84" }, { "coordinates": ["24.21988606452942", "56.986546870129175"], "type": "point", "id": "Neste at Brīvības gatve 386", "name": "Neste at Brīvības gatve 386" }, { "coordinates": ["24.21065926551819", "56.89732619284363"], "type": "point", "id": "Neste at Maskavas iela 427", "name": "Neste at Maskavas iela 427" }, { "coordinates": ["24.10678267478943", "56.96318695007453"], "type": "point", "id": "DINAZ at Hanzas iela 16b", "name": "DINAZ at Hanzas iela 16b" }, { "coordinates": ["24.087342023849487", "56.916841876519264"], "type": "point", "id": "DINAZ at Vienības gatve 77", "name": "DINAZ at Vienības gatve 77" }, { "coordinates": ["24.161510467529297", "56.92607919837452"], "type": "point", "id": "DINAZ at Krasta iela 78", "name": "DINAZ at Krasta iela 78" }, { "coordinates": ["24.173870086669922", "56.960642494704835"], "type": "point", "id": "DINAZ at Dzelzavas iela 36", "name": "DINAZ at Dzelzavas iela 36" }, { "coordinates": ["24.02331233024597", "56.92876066768634"], "type": "point", "id": "DINAZ at Ulmaņa gatve 88", "name": "DINAZ at Ulmaņa gatve 88" }, { "coordinates": ["24.047908186912537", "56.93735412217489"], "type": "point", "id": "DINAZ at Kalnciema iela 88", "name": "DINAZ at Kalnciema iela 88" }, { "coordinates": ["24.24232006072998", "56.88305568798259"], "type": "point", "id": "DINAZ at Maskavas iela 450k", "name": "DINAZ at Maskavas iela 450k" }, { "coordinates": ["24.31795835494995", "57.07895382181283"], "type": "point", "id": "DINAZ at Rīgas gatve 45", "name": "DINAZ at Rīgas gatve 45" }, { "coordinates": ["26.505450010299683", "55.878753454707734"], "type": "point", "id": "DINAZ at Cietokšņa iela 82", "name": "DINAZ at Cietokšņa iela 82" }, { "coordinates": ["23.947051763534546", "56.79152481694323"], "type": "point", "id": "DINAZ at Zemgales iela 1", "name": "DINAZ at Zemgales iela 1" }, { "coordinates": ["26.48332715034485", "55.914455624186566"], "type": "point", "id": "DINAZ at Vizbuļu iela 8a", "name": "DINAZ at Vizbuļu iela 8a" }, { "coordinates": ["26.60468101501465", "55.89512578980312"], "type": "point", "id": "DINAZ at 18.novembra iela 335", "name": "DINAZ at 18.novembra iela 335" }, { "coordinates": ["24.5220887", "56.6058162"], "type": "point", "id": "DINAZ at Vecumnieki", "name": "DINAZ at Vecumnieki" }, { "coordinates": ["24.330661296844482", "56.31454928407328"], "type": "point", "id": "DINAZ at Grenctāle", "name": "DINAZ at Grenctāle" }, { "coordinates": ["23.727593421936035", "56.63617649633457"], "type": "point", "id": "DINAZ at Lietuvas šoseja 2", "name": "DINAZ at Lietuvas šoseja 2" }, { "coordinates": ["23.77294421195984", "56.67545243967231"], "type": "point", "id": "DINAZ at Rīgas iela 56", "name": "DINAZ at Rīgas iela 56" }, { "coordinates": ["23.67607355117798", "56.652522854298496"], "type": "point", "id": "DINAZ at Dobeles šoseja 59", "name": "DINAZ at Dobeles šoseja 59" }, { "coordinates": ["25.866622924804688", "56.515013240990726"], "type": "point", "id": "DINAZ at Varoņu iela 6", "name": "DINAZ at Varoņu iela 6" }, { "coordinates": ["26.70624017715454", "56.298157903082625"], "type": "point", "id": "DINAZ at Rīgas ielā 8", "name": "DINAZ at Rīgas ielā 8" }, { "coordinates": ["27.016797065734863", "56.124361619949866"], "type": "point", "id": "DINAZ at Aglona", "name": "DINAZ at Aglona" }, { "coordinates": ["27.298686504364014", "56.54540847369342"], "type": "point", "id": "DINAZ at Greivuļi", "name": "DINAZ at Greivuļi" }, { "coordinates": ["27.18021869659424", "55.90546550256274"], "type": "point", "id": "DINAZ at Vasarnieku iela 6", "name": "DINAZ at Vasarnieku iela 6" }, { "coordinates": ["27.247638702392578", "56.58577147959137"], "type": "point", "id": "DINAZ at Audriņi", "name": "DINAZ at Audriņi" }, { "coordinates": ["27.35417604446411", "56.483574663526205"], "type": "point", "id": "DINAZ at Griškānu pagasts", "name": "DINAZ at Griškānu pagasts" }, { "coordinates": ["27.33139", "56.508325"], "type": "point", "id": "", "name": "" }, { "coordinates": ["27.687156200408936", "56.784472901346454"], "type": "point", "id": "DINAZ at Šosejas iela 5", "name": "DINAZ at Šosejas iela 5" }, { "coordinates": ["27.701897621154785", "56.53885458604337"], "type": "point", "id": "DINAZ at Latgales iela 22", "name": "DINAZ at Latgales iela 22" }, { "coordinates": ["24.72097635269165", "56.51105302446125"], "type": "point", "id": "DINAZ at Valle", "name": "DINAZ at Valle" }, { "coordinates": ["23.344573974609375", "56.950170378491585"], "type": "point", "id": "DINAZ at  Smārde", "name": "DINAZ at  Smārde" }, { "coordinates": ["24.116803407669067", "56.965529450190594"], "type": "point", "id": "DINAZ at Skanstes iela 7", "name": "DINAZ at Skanstes iela 7" }, { "coordinates": ["24.07357692718506", "56.97357939199756"], "type": "point", "id": "DINAZ at Daugavgrīvas iela 136", "name": "DINAZ at Daugavgrīvas iela 136" }, { "coordinates": ["24.089605808258057", "56.93842523829204"], "type": "point", "id": "DINAZ at  Uzvaras bulvāris 16", "name": "DINAZ at  Uzvaras bulvāris 16" }, { "coordinates": ["24.138894081115723", "56.934228394377705"], "type": "point", "id": "Statoil at Krasta iela 47", "name": "Statoil at Krasta iela 47" }, { "coordinates": ["24.1861031", "56.9506709"], "type": "point", "id": "Statoil at Astras iela 10", "name": "Statoil at Astras iela 10" }, { "coordinates": ["24.728175401687622", "57.512722723845044"], "type": "point", "id": "Statoil at Cēsu iela 32", "name": "Statoil at Cēsu iela 32" }, { "coordinates": ["24.136655", "57.0238673"], "type": "point", "id": "Statoil at Mīlgrāvja iela 10", "name": "Statoil at Mīlgrāvja iela 10" }, { "coordinates": ["23.591208457946777", "56.93120777934369"], "type": "point", "id": "Statoil at  Ventspils šoseja 70", "name": "Statoil at  Ventspils šoseja 70" }, { "coordinates": ["24.427757263183594", "56.82061170047422"], "type": "point", "id": "Statoil at SIA Augstceltne", "name": "Statoil at SIA Augstceltne" }, { "coordinates": ["24.266223907470703", "56.94300786315628"], "type": "point", "id": "Statoil at Graubicas", "name": "Statoil at Graubicas" }, { "coordinates": ["24.430975914001465", "57.26224372096947"], "type": "point", "id": "Statoil at Kurši", "name": "Statoil at Kurši" }, { "coordinates": ["24.41981792449951", "57.22736821903401"], "type": "point", "id": "Statoil at Kurši", "name": "Statoil at Kurši" }, { "coordinates": ["21.582716703414917", "57.38755837281867"], "type": "point", "id": "Statoil at Lāčplēša iela 1", "name": "Statoil at Lāčplēša iela 1" }, { "coordinates": ["24.0957399", "56.9107884"], "type": "point", "id": "Statoil at Valdeķu iela 35", "name": "Statoil at Valdeķu iela 35" }, { "coordinates": ["23.7239002", "56.9621995"], "type": "point", "id": "Statoil at Kalēju iela 4", "name": "Statoil at Kalēju iela 4" }, { "coordinates": ["24.1939988", "56.9034453"], "type": "point", "id": "Statoil at  Maskavas iela 324", "name": "Statoil at  Maskavas iela 324" }, { "coordinates": ["24.856964", "57.1452614"], "type": "point", "id": "Statoil at Vidzemes šoseja 12", "name": "Statoil at Vidzemes šoseja 12" }, { "coordinates": ["24.89772319793701", "56.66283080691411"], "type": "point", "id": "Statoil at Priežkalni 2", "name": "Statoil at Priežkalni 2" }, { "coordinates": ["21.173229217529297", "56.886173980234894"], "type": "point", "id": "Statoil at Ostmalas iela 8", "name": "Statoil at Ostmalas iela 8" }, { "coordinates": ["22.4714266", "56.6817717"], "type": "point", "id": "Statoil at Apvedceļš 11", "name": "Statoil at Apvedceļš 11" }, { "coordinates": ["25.9165981", "57.4210848"], "type": "point", "id": "Statoil at Dārza iela 36", "name": "Statoil at Dārza iela 36" }, { "coordinates": ["25.49506187438965", "57.27952991570545"], "type": "point", "id": "Statoil at Saulrīti", "name": "Statoil at Saulrīti" }, { "coordinates": ["26.71102523803711", "56.30012238280391"], "type": "point", "id": "Statoil at Vega", "name": "Statoil at Vega" }, { "coordinates": ["23.287451", "56.6262861"], "type": "point", "id": "Statoil at Čakstes iela 1", "name": "Statoil at Čakstes iela 1" }, { "coordinates": ["24.156639575958252", "56.92856161326764"], "type": "point", "id": "Statoil at Krasta iela 70", "name": "Statoil at Krasta iela 70" }, { "coordinates": ["24.27849769592285", "56.36467963665434"], "type": "point", "id": "Statoil at Ozolnieki", "name": "Statoil at Ozolnieki" }, { "coordinates": ["24.100656509399414", "56.952885220726245"], "type": "point", "id": "Statoil at Muitas iela 4", "name": "Statoil at Muitas iela 4" }, { "coordinates": ["24.1454585", "56.9664879"], "type": "point", "id": "Statoil at Brīvības iela 176", "name": "Statoil at Brīvības iela 176" }, { "coordinates": ["24.0550476", "56.9515202"], "type": "point", "id": "Statoil at Jūrmalas gatve 5", "name": "Statoil at Jūrmalas gatve 5" }, { "coordinates": ["24.1681376", "56.9736734"], "type": "point", "id": "Statoil at  Brīvības gatve 203", "name": "Statoil at  Brīvības gatve 203" }, { "coordinates": ["24.169717", "56.9631827"], "type": "point", "id": "Statoil at  Dzelzavas iela 14", "name": "Statoil at  Dzelzavas iela 14" }, { "coordinates": ["24.2919797", "57.0050235"], "type": "point", "id": "Statoil at Sigulda 1", "name": "Statoil at Sigulda 1" }, { "coordinates": ["23.287451", "56.6262861"], "type": "point", "id": "Statoil at Jāņa Čakstes iela 1", "name": "Statoil at Jāņa Čakstes iela 1" }, { "coordinates": ["24.1355883", "56.9812526"], "type": "point", "id": "Statoil at Duntes iela 15", "name": "Statoil at Duntes iela 15" }, { "coordinates": ["21.05557680130005", "56.53461879889151"], "type": "point", "id": "Statoil ", "name": "Statoil " }, { "coordinates": ["24.108316898345947", "56.92229671099518"], "type": "point", "id": "Statoil at Mūkusalas iela 75", "name": "Statoil at Mūkusalas iela 75" }, { "coordinates": ["24.01713252067566", "56.92867284969135"], "type": "point", "id": "Statoil at K.Ulmaņa gatve 127", "name": "Statoil at K.Ulmaņa gatve 127" }, { "coordinates": ["24.3195191", "57.0696031"], "type": "point", "id": "Statoil at Vidlauku iela 1", "name": "Statoil at Vidlauku iela 1" }, { "coordinates": ["26.7424886", "57.1783184"], "type": "point", "id": "Statoil at Brīvības iela 89", "name": "Statoil at Brīvības iela 89" }, { "coordinates": ["25.300440788269043", "57.29806005272442"], "type": "point", "id": "Statoil at Piebalgas iela 91", "name": "Statoil at Piebalgas iela 91" }, { "coordinates": ["24.36265468597412", "57.75694924359921"], "type": "point", "id": "Statoil at Viļnu iela 4", "name": "Statoil at Viļnu iela 4" }, { "coordinates": ["25.855379104614258", "56.516629174606315"], "type": "point", "id": "Statoil at Rīgas iela 218", "name": "Statoil at Rīgas iela 218" }, { "coordinates": ["23.6974367", "56.6552993"], "type": "point", "id": "Statoil at Satiksmes iela 29", "name": "Statoil at Satiksmes iela 29" }, { "coordinates": ["23.7301507", "56.6473139"], "type": "point", "id": "Statoil at Akadēmijas iela 20", "name": "Statoil at Akadēmijas iela 20" }, { "coordinates": ["23.742635250091553", "56.657565139806394"], "type": "point", "id": "Statoil at  Brīvības bulvāris 1", "name": "Statoil at  Brīvības bulvāris 1" }, { "coordinates": ["22.584693431854248", "57.23321019207708"], "type": "point", "id": "Statoil at Jaunratnieki", "name": "Statoil at Jaunratnieki" }, { "coordinates": ["24.1962559", "56.4063323"], "type": "point", "id": "Statoil at Zaļā iela 10", "name": "Statoil at Zaļā iela 10" }, { "coordinates": ["24.133783", "56.9714088"], "type": "point", "id": "Statoil at Valdemāra iela 104", "name": "Statoil at Valdemāra iela 104" }, { "coordinates": ["24.05203342437744", "56.9585951056232"], "type": "point", "id": "Statoil at Dzirciema iela 40", "name": "Statoil at Dzirciema iela 40" }, { "coordinates": ["23.16868543624878", "56.9698835940258"], "type": "point", "id": "Statoil at Meža iela 30", "name": "Statoil at Meža iela 30" }, { "coordinates": ["26.229171752929688", "56.85966606702956"], "type": "point", "id": "Statoil at Cesvaines iela 10", "name": "Statoil at Cesvaines iela 10" }, { "coordinates": ["24.2303466796875", "56.94310149968353"], "type": "point", "id": "Statoil at Deglava iela 164", "name": "Statoil at Deglava iela 164" }, { "coordinates": ["24.1366856", "56.9471819"], "type": "point", "id": "Statoil at Kurbada iela 8", "name": "Statoil at Kurbada iela 8" }, { "coordinates": ["24.121504", "56.9932666"], "type": "point", "id": "Statoil at Tvaika iela 2", "name": "Statoil at Tvaika iela 2" }, { "coordinates": ["24.18463110923767", "56.97897038896208"], "type": "point", "id": "Statoil at Brīvības gatve 265", "name": "Statoil at Brīvības gatve 265" }, { "coordinates": ["24.1501863", "56.9641561"], "type": "point", "id": "Statoil at Pērnavas iela 7", "name": "Statoil at Pērnavas iela 7" }, { "coordinates": ["26.524633169174194", "55.87658078838208"], "type": "point", "id": "Statoil at Stacijas 97", "name": "Statoil at Stacijas 97" }, { "coordinates": ["24.0968717", "56.9555699"], "type": "point", "id": "Statoil at Eksporta iela 1c", "name": "Statoil at Eksporta iela 1c" }, { "coordinates": ["24.188769", "56.9062266"], "type": "point", "id": "Statoil at Maskavas iela 349", "name": "Statoil at Maskavas iela 349" }, { "coordinates": ["27.3406755", "56.5240709"], "type": "point", "id": "Statoil at Atbrīvošanas aleja 143", "name": "Statoil at Atbrīvošanas aleja 143" }, { "coordinates": ["25.393202304840088", "57.530369267664355"], "type": "point", "id": "Statoil at Ausekļa iela 26", "name": "Statoil at Ausekļa iela 26" }, { "coordinates": ["25.43462634086609", "57.526895941355356"], "type": "point", "id": "Statoil at Stacijas iela 29", "name": "Statoil at Stacijas iela 29" }, { "coordinates": ["23.7628569", "56.9667668"], "type": "point", "id": "Statoil at Dubultu prospekts 42a", "name": "Statoil at Dubultu prospekts 42a" }, { "coordinates": ["24.2338447", "56.9586436"], "type": "point", "id": "Statoil at  Biķernieku iela 121a", "name": "Statoil at  Biķernieku iela 121a" }, { "coordinates": ["24.084584712982178", "56.90954116474109"], "type": "point", "id": "Statoil at Vienības gatve 105", "name": "Statoil at Vienības gatve 105" }, { "coordinates": ["26.544835567474365", "55.87439596252542"], "type": "point", "id": "Statoil at Ventspils iela 28", "name": "Statoil at Ventspils iela 28" }, { "coordinates": ["24.18511390686035", "56.95063846884488"], "type": "point", "id": "Statoil at Gunāra Astras iela 17", "name": "Statoil at Gunāra Astras iela 17" }, { "coordinates": ["24.243392944335938", "56.9893408929978"], "type": "point", "id": "Statoil at Brīvības gatve 434", "name": "Statoil at Brīvības gatve 434" }, { "coordinates": ["24.199587106704712", "56.93109655047779"], "type": "point", "id": "Statoil at Lubānas iela 76", "name": "Statoil at Lubānas iela 76" }, { "coordinates": ["21.586031913757324", "57.38527427500298"], "type": "point", "id": "Statoil at Rūpniecības iela 4", "name": "Statoil at Rūpniecības iela 4" }, { "coordinates": ["24.018688201904297", "56.95960126517113"], "type": "point", "id": "Statoil at Anniņmuižas bulvāris 25a", "name": "Statoil at Anniņmuižas bulvāris 25a" }, { "coordinates": ["24.003925323486328", "56.933643022974415"], "type": "point", "id": "Statoil at K.Ulmaņa gatve 117", "name": "Statoil at K.Ulmaņa gatve 117" }, { "coordinates": ["24.1228581", "56.9126716"], "type": "point", "id": "Statoil at Ziepniekkalna iela 9", "name": "Statoil at Ziepniekkalna iela 9" }, { "coordinates": ["24.16294813156128", "56.92358490764415"], "type": "point", "id": "Statoil at Krasta iela 101", "name": "Statoil at Krasta iela 101" }, { "coordinates": ["21.01761817932129", "56.51559924685745"], "type": "point", "id": "Statoil at Esperanto iela 2/8", "name": "Statoil at Esperanto iela 2/8" }, { "coordinates": ["24.006285667419434", "56.93439229672449"], "type": "point", "id": "Statoil at K.Ulmaņa gatve 110", "name": "Statoil at K.Ulmaņa gatve 110" }];

    // preprocess data
    for (var i = 0; i < data.length; i++) {
        var x = data[i];
        x.id = i + " - " + x.id;
        x.coordinates[0] = parseFloat(x.coordinates[0]);
        x.coordinates[1] = parseFloat(x.coordinates[1]);
    }

    function dataFunc(request, success, fail) {
        // filter out nodes for requested region only.
        var nodes = [];
        for (var i = 0; i < data.length; i++) {
            var x = data[i];
            if (x.coordinates[0] >= request.west && x.coordinates[0] <= request.east && x.coordinates[1] >= request.south && x.coordinates[1] <= request.north) {
                nodes.push(x);
            }
        }

        if (window.console) {
            console.log("Request: ", request);
            console.log("Response: ", nodes);
        }

        success({ nodes: nodes }, 200);
    }

    var chart = null;
    var options = {
        area: { height: null },
        container: document.getElementById("demo"),
        navigation: {
            initialLat: 56.966689,
            initialLng: 24.167840,
            initialZoom: 15,
            minZoom: 12
        },
        data: {
            dataFunction: dataFunc,
            perZoomData: false
        },
        layers: [
            {
                id: "default",
                type: "items",
                style: {
                    node: {
                        radius: 15,
                        display: "image",
                        lineWidth: null,
                        fillColor: null,
                        lineColor: null,
                        image: "/dvsl/data/geo-chart/icons/gas_station.png"
                    },
                    nodeStyleFunction: function (node) {
                        node.label = node.data.name;
                    },
                    nodeLabel: {
                        textStyle: {
                            font: "10px Arial"
                        }
                    }
                }
            }
        ]
    };

    var chart = new GeoChart(options);

Data

Data
�PNG


IHDR���>a�sBIT|d�	pHYsD$D$@g�TtEXtSoftwarewww.inkscape.org��<	�IDATx��m�Ve���.��a��A�b5p��(IE
�Q��L�4Nc3���bl�lhr��1����Q�~8�Z��5$���(4�J,���,{�q����<�=�}λ�}������{�s��|��Dq�"�,���i�T`\n+����o��CU���JB��"2X
|���خ���U�c��ɋ��q$��@S^I������5t"y�Y9x�2׌j���T����L��T�c��3�-�VջB'Q	��H�;�B2�=nR՟�N"+c2��6���VD�N"+^����ʂr�U��o�N"+�{�5��׊Ȃ�Id��5PDf�����e�H�v!�L�ls�{�@iP��u��I���|˱�����U�`�܂!"p>p7�1�f��ɪzx�>��>�$9�z�����Pm�����s�0OU�YA^�AD����\U7�G#��d�6��Pէ�g����E�q�������d�p�0}��&D���偓���B;�_W�Q�P�>�g��眺@Df���x�q��/��q�L"��?�?�hc�cܔA��>8:xRD�p��W��j�ϑǸ��8�("��hSvM_<��]O6�ȥ�s&@��c��٬�,"�H�$L����1�6��E���s�
�'�7�=��	x&}S&@�Pգ��$�}��VD���P&@I%����t2�\�wN&@�I}���t
��������X<��t*�3�����v���M��"r^y�Q�#��8�#��$�[i&@`ұK���#9�����%@U�HF[m�l�v�=�Ԭ�6J��v��Mg��	{9"&@�P�C�Հz6��D�ɾ�4JF:��C�NϦ��6n�id�U��A`�g�w����ho��������,r
6�MW�v��;]M���jY1R�	0z���4���4�{�h�~&��4~�`_���,���N�n��?I_|=�	P_�����?V
,ic�
�}�L��d��,��xC����3C'P�!�z�9J(���@��yy0�l���Έ�ԋ �����k�8xHD\���"r+ɳ��DZ�x_9����D����2�B˂��CR%�s�r8v��ޱc������:{�y�ګ8�h�u477�����ZŤ�觑d�������#"���^!�}�����W�&@�ٹs糸�)��(9qǽ��+H*��	P�ڵk_�7��Zf�;v��|=�~M�b�̙_ÿ����5ĺu�544,����-�!1j��۷jjj����L�d˖-���݋�(�,r&@��{��8�S�9�	Pè����ƥq�V;�	P㴵�iiiY��A����vwtt|xʷ�ӤQi��=r�7zHf�%�`�8��K�׮���X�ܹs���~E�u�mL�0��xDU_γc���K�	����*U�m��…:;;�0����e��[���Okkk/�4u�	P��5'�p��a
�+���R�\���
M��qK:S{U0��8����	�/=��(���~����Iix�~/�����.����l�AR�{p3�P#�, y��PL�Q�^���&Y�7����-�U]/s��
&@h�:�9�}K/����0B�c�
q���I��!� �
L��<�7	�}�i�������e $����~�����{���}��c�q��"�d�B�("��9��
l��`"��0p'n���O�ȫ�?H�ކ�Բ?R��l��u�<�M.��o�V\`��5$Uŋ�AU=���	P�]��+�5��.4��}d��Ác��U��S�0JB:L�z����W���L�����G�.ܮ�k���(�n�=�#v��\U�.�(!�ڥ��.|��� �E8SUG,4i7�J��>,n ���L��?oI%җHj�JU]�P��3h���s�(����JI�8���;eY/�'���ZZZ��N�R��������}��8FD>|_ir��DQ�Q-koow\8cDd�=l�N�����p�<2X��T�%"rY�$�H�$�8�K�!9�4�HE����>@��	�c�9&@�c�9�m ��[��IEND�B`�
Download Data