Just starting to use AmCharts 5 and I'm struggling to trigger a simple zoom into a location on a map. No matter which tutorial I follow, I can't seem to replicate the results others are getting.
If you want to take a look at my Codepen setup to play around with the code, here's the link: https://codepen.io/tonycre8-the-bold/pen/wvQZojM
I've attempted to use the following function to try and make it work:
// Retrieving geolocations for London & Stamford
var locations = [
{ id: "london", title: "London", geometry: { type: "Point", coordinates: [51.5074, 0.1278] } },
{ id: "stamford", title: "Stamford", geometry: {type: "Point", coordinates: [52.6466, -0.4833]} }
];
// Zooming in on London
locationChart.events.on("ready", function() {
locationChart.zoomToGeoPoint({ latitude: 51.5074, longitude: 0.1278 }, 4, true);
});
I'm feeling a bit lost as the version 5 documentation leads to version 4 code that doesn't cooperate with v5 implementation. Everything is a little confusing at the moment.