function map_init(){
  //alert("init called!");
  map=create_map();
  map.addLayers([hintergrundhybrid, hintergrundluftbild,  hintergrundkarte]);

  mappoints = new OpenLayers.Layer.Markers("mappoints");
  map.addLayer(mappoints);

  jq.getJSON("locations_json?jsonp=?",
        function(data){
          jq.each(data, function(i,item){
            var size = new OpenLayers.Size(14,14);
            var offset = new OpenLayers.Pixel(-(size.w/2), -(size.h/2));
            addPopupMarker(new OpenLayers.LonLat(item['x'], item['y']),
                           item['popupHtml'],
                           item['id'],
                           item['primaryCategory'],
                           item['icon'], size, offset
                          );
          });

       });

  map.addControl(new OpenLayers.Control.LayerSwitcher());
  map.setCenter(map_centerx,map_centery);
  map.zoomToScale(15000);

}



