tests/Leaflet/sl-application.js
/* =========================================================================
**  loadmap
** =========================================================================
** A singular region or default region, no searches have been made */
loadmap
A singular region or default region, no searches have been made
loadmap A singular region or default region no searches have been made
function loadmap(firstJoinUrl)
{
    var zoomLevel = 6;
	var latlng = L.latLng(3650.5, 3650.5);
    var $body = $('body');
    if ($body.data('region-coords-error')) {
        var errorContent = slurl_data['noexist_windowcontent'];
        $('#marker0').remove();
        $('#location-heading').html('Destination Guide Picks');
        $('#dest-guide-title').remove();
        $('body').prepend(errorContent);
        $('#map-error #error-content .error-close').click(function () {
            $('#map-error').hide();
        });
        $map.setView(latlng, zoomLevel);
    }
    else if (!slurl_data['region']['default']) {
        var x = parseInt($body.data('region-coords-x')) + slurl_data['region']['x'] / 256;
        var y = parseInt($body.data('region-coords-y')) + slurl_data['region']['y'] / 256;
        if (is_number(x) && is_number(y)) latlng = L.latLng(y, x);
        var bubbleContent = slurl_data['windowcontent'].replace('/\s+/', ' ');
        var $content = $('<div/>').html(bubbleContent);
        if (firstJoinUrl) {
            $content.find('a.join_button').attr('href', firstJoinUrl);
        }
        var marker = makeMarkerForSidebar($content.get(0), latlng, $('#marker0'));
        $map.setView(latlng, MAX_ZOOM_LEVEL);
        marker.openPopup();
    }
    else {
        $map.setView(latlng, zoomLevel);
    }
}
function loadmap ( firstJoinUrl ) { var zoomLevel = 6 ; var latlng = L . latLng ( 3650.5 , 3650.5 ) ; var $body = $ ( 'body' ) ; if ( $body . data ( 'region-coords-error' ) ) { var errorContent = slurl_data [ 'noexist_windowcontent' ] ; $ ( '#marker0' ) . remove ( ) ; $ ( '#location-heading' ) . html ( 'Destination Guide Picks' ) ; $ ( '#dest-guide-title' ) . remove ( ) ; $ ( 'body' ) . prepend ( errorContent ) ; $ ( '#map-error #error-content .error-close' ) . click ( function ( ) { $ ( '#map-error' ) . hide ( ) ; } ) ; $map . setView ( latlng , zoomLevel ) ; } else if ( ! slurl_data [ 'region' ] [ 'default' ] ) { var x = parseInt ( $body . data ( 'region-coords-x' ) ) + slurl_data [ 'region' ] [ 'x' ] / 256 ; var y = parseInt ( $body . data ( 'region-coords-y' ) ) + slurl_data [ 'region' ] [ 'y' ] / 256 ; if ( is_number ( x ) && is_number ( y ) ) latlng = L . latLng ( y , x ) ; var bubbleContent = slurl_data [ 'windowcontent' ] . replace ( '/\s+/' , ' ' ) ; var $content = $ ( '<div/>' ) . html ( bubbleContent ) ; if ( firstJoinUrl ) { $content . find ( 'a.join_button' ) . attr ( 'href' , firstJoinUrl ) ; } var marker = makeMarkerForSidebar ( $content . get ( 0 ) , latlng , $ ( '#marker0' ) ) ; $map . setView ( latlng , MAX_ZOOM_LEVEL ) ; marker . openPopup ( ) ; } else { $map . setView ( latlng , zoomLevel ) ; } }
loadmap
A singular region or default region, no searches have been made
loadmap A singular region or default region no searches have been made
// Select our old Ahern default, even if we don't put a marker there. This can // happen if the directly linked region name is no longer valid (the error // case), or until the sidebar loads. // var latlng = L.latLng(1002.5, 997.5); // let's not link to nothing, now