Home »
Member Page
David Brown
David Brown is an avid jazz record collector and hosts The Jazz Continuum radio show.
About Me
David Brown is an avid jazz record collector and radio show host. By day, he works as an elementary school
administrator with an office full of records, a computer and a turntable. He lives in the Germantown neighborhood of
Philadelphia. He joined G-Town Radio, WGGT LP 92.9 FM as a programmer of the Jazz Continuum in 2020. Each
week he pulls from the stacks that fill his row home to explore the elements of jazz through multiple decades, styles
and up to the minute releases.
My
Articles
Merge with other member page
-->
My Favorite Local Jazz Venues & Festivals
Use your mousepointer (or zoom in) to move the map.
Click a pin drop to identify a venue.
";
return [content, title];
}
function call_geocode(platform, ent) {
var ent_addr = ent.addr1 + ' ' + ent.city;
if (ent.state) ent_addr = ent_addr + ", " + ent.state;
if (ent.zip) ent_addr = ent_addr + ent.zip;
ent_addr = ent_addr + ', ' + ent.country_name;
if (ent_addr!='') {
contentAndTitleArray = renderContentAndTitle(ent);
var geocoder = platform.getSearchService();
geocoder.geocode({
q: ent_addr
}, (result) => {
// Add a marker for each location found
result.items.forEach((item) => {
$.ajax({
url: 'https://www.jazznearyou.com/functions/ajax-functions/upd_entity_latlng.php?id='+ent.id,
type: "POST",
data: {'lat': item.access[0].lat, 'lng': item.access[0].lng},
dataType : "json",
success: function (data, textStatus) {
$.each(data, function(i, val) {
if (i == 'errs' && val != '') {
// console.log("error: " + val);
} else {
// console.log(ent.id + " is updated");
}
})
}
});
var marker = new H.map.Marker(item.position, { icon: icon });
// marker.label = contentAndTitleArray[1];
marker.setData(contentAndTitleArray[0]);
map.addObject(marker);
marker.addEventListener('tap', function (evt) {
// map.setCenter(evt.target.a);
// event target is the marker itself, group is a parent event target
// for all objects that it contains
var bubble = new H.ui.InfoBubble(evt.target.getGeometry(), {
// read custom data
content: evt.target.getData()
});
// show info bubble
ui.addBubble(bubble);
}, false);
});
}, alert);
}
}
const platform = new H.service.Platform({ apikey: '22RaiAehJhmSQsR3jH-UZKETwDfDSEJzKMO_3w4g_Jg'});
const defaultLayers = platform.createDefaultLayers();
const map = new H.Map(document.getElementById('map-canvas'),
defaultLayers.vector.normal.map, {
center: { lat: 39.99, lng: -75.14 },
zoom: 10,
pixelRatio: window.devicePixelRatio || 1
});
window.addEventListener('resize', () => map.getViewPort().resize());
const behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
const ui = H.ui.UI.createDefault(map, defaultLayers);
var icon = new H.map.Icon('red-dot.png');
// map.getBaseLayer().getProvider().getStyle().getConfig();
changeFeatureStyle(map);
if (entities.length>1) {
group = new H.map.Group();
}
for (var i=0; i < entities.length; i++) {
//console.log (entities[i]);
if (!(entities[i].latitude) || !(entities[i].longitude)) {
//console.log (entities[i]);
call_geocode(platform, entities[i]);
}
else {
contentAndTitleArray = renderContentAndTitle(entities[i]);
// use DB long/lat coords to create marker coords
var marker = new H.map.Marker({lat: parseFloat(entities[i].latitude), lng: parseFloat(entities[i].longitude)}, { icon: icon });
// add custom data to the marker
// marker.label = contentAndTitleArray[1];
marker.setData(contentAndTitleArray[0]);
map.addObject(marker);
marker.addEventListener('tap', function (evt) {
// map.setCenter(evt.target.a);
// event target is the marker itself, group is a parent event target
// for all objects that it contains
var bubble = new H.ui.InfoBubble(evt.target.getGeometry(), {
// read custom data
content: evt.target.getData()
});
// show info bubble
ui.addBubble(bubble);
}, false);
if (entities.length>1) {
group.addObjects([marker]);
}
}
if (entities.length>1) {
map.addObject(group);
map.getViewModel().setLookAtData({
bounds: group.getBoundingBox()
});
}
}