top of page
Forum Posts
paul_frith
Mar 23, 2019
In Coding with Velo
Hey Everyone, I am trying to get a map to show a bunch of different locations held within a dataset that lists the names of Shops and the Lat/Long positions. Because I know that the map errors when sent null values, I have filtered my dataset, so that it only shows records that have a valid lat/long. I have done this by adding filters of Latitude >= -180 and Latitude <=180 and Longitude >= -90 and Longitude < 90. I can show this data on my page - and see that all values are populated, however when I run this data into the map I get the following error: Wix code SDK Warning: The latitude parameter of "locationMap" that is passed to the location method cannot be set to null or undefined.FIND SHOPS Line 7
I am using the following code: $w.onReady(function () {
$w("#ShopsLatLngFilterDS").onReady(() => {
let currentItem = $w("#ShopsLatLngFilterDS").getCurrentItem();
$w("#locationMap").location = {
"latitude": currentItem.Latitude,
"longitude": currentItem.Longitude,
"description": currentItem.Title
};
});
}); Any ideas of why this is happening? #UndefinedParameter #WixCode #SDKWarning #FilteredDatasets
1
4
922
paul_frith
More actions
bottom of page