'Tis the season! Time to unwind with mulled wine and munch on Christmas cookies with the best company at one of Berlin's many Christmas markets. The German capital has a database of all its pop-up seasonal markets which we wanted to play around with. We will now see how to fetch this data using AJAX, display the markets on the map using our Geocoder and find the one that can be reached the fastest, practically, using Isoline routing. To use any of the HERE JavaScript APIs you need to get your App_ID and App_code by signing up for a Freemium account. To display a map and set a marker on a location, follow our Senior Evangelist Michael Palermo's tutorial.

Once you have a basic map and a marker, we will use XMLHttpRequest to fetch the json file from the external data source.

We need to now parse this data as a json object and extract the address of the markets. After scanning the dataset, I found that the required fields are strasse and plz_ort. These data fields are the search text for our geocoder.

Once you have your position and the markets' positions marked, we check the markets nearest to us by drawing a circle of radius 5Km around our position. You will thus see all the markets in a 5km radius of your position. The radius here is in meters.

Although this gives a fair idea about which markets are nearest from you, they cannot necessarily be reached within a similar time given the time of the day, traffic and road conditions. To take these conditions into consideration and to get a realistic view of places that can be reached, we use the Isoline Routing API. The Isoline highlights an area which can be reached by car from your position in 10 minutes or less. Isoline also has a pedestrian mode. Lets take a look at the code for this one.

You can try your hand at more routing parameters to refine your isoline area. Try swapping the 'rangetype': to 'distance' and the 'range': to '5000'//meters. You will clearly be able to see that there are still some places which were inside the circle but not reachable if you consider traffic and time using the isoline routing.

With this tutorial, we have seen how to use external data sources, call the data using AJAX, parse the json file using JSON.parse, draw a circle on the map and calculate reachable places considering traffic and time with isoline routing. If you have any difficulties in following this tutorial, comment below and I will try to answer them. You can also ask us your doubts about any of our HERE APIs on stackoverflow with the tag 'here-api' and our team will answer your queries.

Thats all from me for this year. Happy holidays! See you on the other side of 2018.