sandbox/index.js
// when jQuery has loaded the data, we can create features for each photo
when jQuery has loaded the data, we can create features for each photo
when jQuery has loaded the data we can create features for each photo
function successHandler(data) {
  data.forEach(function(item) {
    var feature = new OpenLayers.Feature(item);
    console.debug(item)
    var myLocation = new OpenLayers.Geometry.Point(parseFloat(item.LON), parseFloat(item.LAT)).transform('EPSG:4326', 'EPSG:3857');
    console.debug(myLocation);
    overlay.addFeatures([
        new OpenLayers.Feature.Vector(myLocation, {tooltip: "School"})
    ]);
  });
}
function successHandler ( data ) { data . forEach ( function ( item ) { var feature = new OpenLayers . Feature ( item ) ; console . debug ( item ) var myLocation = new OpenLayers . Geometry . Point ( parseFloat ( item . LON ) , parseFloat ( item . LAT ) ) . transform ( 'EPSG:4326' , 'EPSG:3857' ) ; console . debug ( myLocation ) ; overlay . addFeatures ( [ new OpenLayers . Feature . Vector ( myLocation , { tooltip : "School" } ) ] ) ; } ) ; }
when jQuery has loaded the data, we can create features for each photo
when jQuery has loaded the data we can create features for each photo
// we need to transform the geometries into the view's projection //  var transform = ol.proj.getTransform('EPSG:4326', 'EPSG:3857'); // loop over the items in the response // create a new feature with the item as the properties // add a url property for later ease of access //    feature.set('url', item.media.m); // create an appropriate geometry and add it to the feature