<commit_before>var map, layer, layers=[], mapOptions;

/*
This function craetes the map and layers.

Additional parameters and layers can be given to the
function.

map_div -- id of the element to create the map into
callback_function -- callback function the to be called after creation
    The callback_function will get the map as a parameter
*/
function create_map(map_div, callback_function) {
    
    {% for p in layer_data %}
        {% if p.protocol = 'ARCcache' %}
            layer = new OpenLayers.Layer.ArcGISCache(
                "{{ p.name }}",
                "{{ p.source }}",
                { layerInfo: {{ p.layer_info|safe }} },
                {% if p.layer_type = 'BL'%}
                    {isBaseLayer: true}
                {% else %}
                    {isBaseLayer: false}
                {% endif %}
                );
            layers.push(layer);
            mapOptions = {
                maxExtent: layer.fullExtent,
                units: layer.units,
                resolutions: layer.resolutions,
                numZoomLevels: layer.numZoomLevels,
                tileSize: layer.tileSize,
                displayProjection: layer.displayProjection
                };
        {% else %}
        {% if p.protocol = 'ARCGIS' %}
            layer = new OpenLayers.Layer.ArcGIS93Rest(
                "{{ p.name }}",
                "{{ p.source }}",
                {layers: "show:{{ p.layers }}",
                format: "png24",
                transparent: true},
                {% if p.layer_type = 'BL'%}
                    {isBaseLayer: true}
                    {% else %}
                    {isBaseLayer: false}
                {% endif %}
                );<commit_msg>added some extra parameters to the argiscache map object, there is a zoom problem with the layer, http://lists.osgeo.org/pipermail/openlayers-users//2011-December/023490.html<commit_after>var map, layer, layers=[], mapOptions;

/*
This function craetes the map and layers.

Additional parameters and layers can be given to the
function.

map_div -- id of the element to create the map into
callback_function -- callback function the to be called after creation
    The callback_function will get the map as a parameter
*/
function create_map(map_div, callback_function) {
    
    {% for p in layer_data %}
        {% if p.protocol = 'ARCcache' %}
            layer = new OpenLayers.Layer.ArcGISCache(
                "{{ p.name }}",
                "{{ p.source }}",
                { layerInfo: {{ p.layer_info|safe }} },
                {% if p.layer_type = 'BL'%}
                    {isBaseLayer: true,
                    overrideDPI: true}
                {% else %}
                    {isBaseLayer: false}
                {% endif %}
                );
            layers.push(layer);
            mapOptions = {
                maxExtent: layer.fullExtent,
                units: layer.units,
                resolutions: layer.resolutions,
                numZoomLevels: layer.numZoomLevels,
                tileSize: layer.tileSize,
                displayProjection: layer.displayProjection,
                projection: layer.projection,
                maxResolution: 135.466937600542,
                maxScale: 750.001905003809,
                minResolution: 0.264583862501058,
                minScale: 384000.9753619511,
                resolutions: layer.resolutions,
                units: layer.units
                };
        {% else %}
        {% if p.protocol = 'ARCGIS' %}
            layer = new OpenLayers.Layer.ArcGIS93Rest(
                "{{ p.name }}",
                "{{ p.source }}",
                {layers: "show:{{ p.layers }}",
                format: "png24",
                transparent: true},
                {% if p.layer_type = 'BL'%}
                    {isBaseLayer: true}
                    {% else %}
                    {isBaseLayer: false}
                {% endif %}
                );
{'fraction_non_alphanumeric': 0.10510358767054068, 'fraction_numerical': 0.0202122283981809, 'mean_word_length': 1.4066869300911855, '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': '730705', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1004, 'n_words': 263}