Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- callbackEventbrite(function(result){
- console.log("env", result)
- //var geo = GeoJSON.parse(result.events,{Point: [result.location.latitude, result.location.longitude]});
- //console.log(geo);
- const keys = Object.values(result);
- for(const key of keys){
- geojson = {
- type: 'featureCollection',
- features: [{
- type: 'feature',
- geometry: {
- type: 'Point',
- coordinates: [key.venue.longitude, key.venue.latitude]
- }
- }]
- }
- eventInfo.push(
- {"longitude": key.venue.longitude , "latitude": key.venue.latitude , "name": key.name.text, "venue": key.venue.name, "date": key.start.local, "category": key.category_id}
- );
- }
- });
- function callbackEventbrite(callback){
- $.ajax(briteSettings).done(function(data){
- callback(data.events);
- });
- }
- // What Iv'e got to work (hard coded data)
- map.on("load", function(){
- map.addLayer({
- "id": "locations",
- "type": "symbol",
- "source": {
- "type": "geojson",
- "data": {
- "type": "FeatureCollection",
- "features": [
- {
- "type": "Feature",
- "properties": {
- "Title": "The Congress Inn",
- "Description": "Pub located in Longton",
- "Type": "Pub",
- "Address": "14 Sutherland Rd, Stoke-on-Trent ST3 1HJ",
- "Longitude": 2.1316,
- "Latitude": 52.9878,
- "icon": "bar"
- },
- "geometry": {
- "coordinates": [
- -2.131836,
- 52.987238
- ],
- "type": "Point"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement