<commit_before>var map;        //complex object of type OpenLayers.Map
var zoom = 4;  //zoom of the map
var markerHash = null; //hashmap for markers
var route = null; //kml layer
var layerMarkers = null; //marker layer
var tmpMarkerHash = null;
var tmpMarkerIds = null;
var center = null;


function initEvents(){
    resizeMap();

}
Event.observe(window, "load", resizeMap);
Event.observe(window, "resize", resizeMap);
/**
 *  Loads the map and registers the listener
 *  for the onclick event to set points on the map
 *
 */
function loadMap(){
    markerHash = new Array();
    tmpMarkerHash = new Array();
    tmpMarkerIds = new Array();
    // Start position for the map (hardcoded here for simplicity,
    // but maybe you want to get from URL params)
    var lat=48.1102751;
    var lon=11.5170473;
    //53.075878;8.807311
    //47.547855" lon="7.589664
    init(lat,lon,zoom);
    document.oncontextmenu = function noContextMenu(e) {
        return false;
    };
    map.events.register('mousedown', map, handleMapClick);

}

/**
 * Initialize the map object and set the middle to the entered parameters
 * with the entered zoom
 * @param lat latitude
 * @param lon longitude
 * @param zoom zoom
 *
 */
function init(lat,lon,zoom) {
    map = new OpenLayers.Map ("map", {
        controls:[
        new OpenLayers.Control.Navigation(),
        new OpenLayers.Control.PanZoomBar(),
        new OpenLayers.Control.LayerSwitcher(),
        new OpenLayers.Control.Attribution()],
        maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
        maxResolution: 156543.0399,
        numZoomLevels: 19,
        units: 'm',
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326")
    } );

    // Define the map layer
    // Note that we use a predefined layer that will be
    // kept up to date with URL changes
    // Here we define just one layer, but providing a choice
    // of several layers is also quite simple
    // Other defined layers are OpenLayers.Layer.OSM.Mapnik, OpenLayers.Layer.OSM.Maplint and OpenLayers.Layer.OSM.CycleMap
    layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
    map.addLayer(layerMapnik);
    layerTilesAtHome = new OpenLayers.Layer.OSM.Osmarender("Osmarender");
    map.addLayer(layerTilesAtHome);
    layerCycleMap = new OpenLayers.Layer.OSM.CycleMap("CycleMap");
    map.addLayer(layerCycleMap);
    layerMarkers = new OpenLayers.Layer.Markers("Markers");
    map.addLayer(layerMarkers);

    //sets center point of the map
    center = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
    map.setCenter (center, zoom);
    map.events.register("moveend", map, onmoveend);
//map.events.register("changelayer", map, updateLocation);
}
function resetCenter(){
    map.setCenter (center, zoom);
}
/**
 *  Shows the pop up to set a point by click on the map
 *  @param evt event to get coordinates of the mouse pointer
 *
 */
function handleMapClick(evt)
{
    var rightclick;
    if (!evt)
        evt = window.event;

    if (evt.which)<commit_msg>remove osmarender-support<commit_after>var map;        //complex object of type OpenLayers.Map
var zoom = 4;  //zoom of the map
var markerHash = null; //hashmap for markers
var route = null; //kml layer
var layerMarkers = null; //marker layer
var tmpMarkerHash = null;
var tmpMarkerIds = null;
var center = null;


function initEvents(){
    resizeMap();

}
Event.observe(window, "load", resizeMap);
Event.observe(window, "resize", resizeMap);
/**
 *  Loads the map and registers the listener
 *  for the onclick event to set points on the map
 *
 */
function loadMap(){
    markerHash = new Array();
    tmpMarkerHash = new Array();
    tmpMarkerIds = new Array();
    // Start position for the map (hardcoded here for simplicity,
    // but maybe you want to get from URL params)
    var lat=48.1102751;
    var lon=11.5170473;
    //53.075878;8.807311
    //47.547855" lon="7.589664
    init(lat,lon,zoom);
    document.oncontextmenu = function noContextMenu(e) {
        return false;
    };
    map.events.register('mousedown', map, handleMapClick);

}

/**
 * Initialize the map object and set the middle to the entered parameters
 * with the entered zoom
 * @param lat latitude
 * @param lon longitude
 * @param zoom zoom
 *
 */
function init(lat,lon,zoom) {
    map = new OpenLayers.Map ("map", {
        controls:[
        new OpenLayers.Control.Navigation(),
        new OpenLayers.Control.PanZoomBar(),
        new OpenLayers.Control.LayerSwitcher(),
        new OpenLayers.Control.Attribution()],
        maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
        maxResolution: 156543.0399,
        numZoomLevels: 19,
        units: 'm',
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326")
    } );

    // Define the map layer
    // Note that we use a predefined layer that will be
    // kept up to date with URL changes
    // Here we define just one layer, but providing a choice
    // of several layers is also quite simple
    // Other defined layers are OpenLayers.Layer.OSM.Mapnik, OpenLayers.Layer.OSM.Maplint and OpenLayers.Layer.OSM.CycleMap
    layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
    map.addLayer(layerMapnik);
    //layerTilesAtHome = new OpenLayers.Layer.OSM.Osmarender("Osmarender"); //Server was shut down
    //map.addLayer(layerTilesAtHome);
    layerCycleMap = new OpenLayers.Layer.OSM.CycleMap("CycleMap");
    map.addLayer(layerCycleMap);
    layerMarkers = new OpenLayers.Layer.Markers("Markers");
    map.addLayer(layerMarkers);

    //sets center point of the map
    center = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
    map.setCenter (center, zoom);
    map.events.register("moveend", map, onmoveend);
//map.events.register("changelayer", map, updateLocation);
}
function resetCenter(){
    map.setCenter (center, zoom);
}
/**
 *  Shows the pop up to set a point by click on the map
 *  @param evt event to get coordinates of the mouse pointer
 *
 */
function handleMapClick(evt)
{
    var rightclick;
    if (!evt)
        evt = window.event;

    if (evt.which)
{'fraction_non_alphanumeric': 0.11568042693454716, 'fraction_numerical': 0.036101083032490974, 'mean_word_length': 3.2793821356615176, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6263362', 'n_tokens_mistral': 2190, 'n_tokens_neox': 1999, 'n_words': 576}