Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 04:07

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Google Map Zoom Problem

Discussion on Google Map Zoom Problem within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1

 
boxxiebabee's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,222
Received Thanks: 500
Google Map Zoom Problem

Servus,

ich arbeite gerade an nem älteren Projekt weiter und mir ist da grad ein Problem aufgefallen.
Also ich hab als Background eine Google Map, und da kann man normalerweiße vertikal rausscrollen. Das hab ich nun einfach begrenzt und funktioniert auch soweit. Nur wenn ich mit dem Mausrad zoome komme ich trotzdem in den grauen Bereich auserhalb der Map, wenn man aber die Controls verwendet dann wird das erfolgreich "geblockt".

Was ich meine:

Script:
Code:
THEME.gmap.position = function () {
    var allowedBounds;
    var lastCenter;
    var lastZoom;
    var initCenter;
    var initZoom;

    function checkBounds() {
        if (THEME.base.isUndefined(allowedBounds)) {
            return false;
        }
        if (allowedBounds.getNorthEast().lat() > THEME.gmap.google_map.getBounds().getNorthEast().lat()) {
            if (allowedBounds.getSouthWest().lat() < THEME.gmap.google_map.getBounds().getSouthWest().lat()) {
                lastCenter = THEME.gmap.google_map.getCenter();
                lastZoom = THEME.gmap.google_map.getZoom();
                return true;
            }
        }
        THEME.gmap.google_map.panTo(lastCenter);
        THEME.gmap.google_map.setZoom(lastZoom);
        return false;
    }

    return {
        createLatLng:function (lat, lng) {
            return new google.maps.LatLng(lat, lng);
        },
        centerMap:function (latLng) {
            THEME.gmap.google_map.setCenter(latLng);
        },
        setLimit:function () {
            allowedBounds = new google.maps.LatLngBounds(
                this.createLatLng(-85.0511, -122.591),
                this.createLatLng(85.0511, -122.333)
            );
            initCenter, lastCenter = THEME.gmap.google_map.getCenter();
            initZoom, lastZoom = THEME.gmap.google_map.getZoom();
            google.maps.event.addListener(THEME.gmap.google_map, 'bounds_changed', function () {
                checkBounds();
            });
            google.maps.event.addListener(THEME.gmap.google_map, 'center_changed', function () {
                checkBounds();
            });
        }
    };
}();
Hier kann man sich das ganze noch anschauen:
boxxiebabee is offline  
Reply


Similar Threads Similar Threads
Zoom Problem und welcher Charakter ist das?
01/20/2013 - Aion - 4 Replies
Hey ho ich hab mir erfolgreich Aion installiert mich eingeloggt nen Krieger erstellt und erfolgreich das erste mal gespawnt... Nur dumm ist das es am anfang komplett Reingezoomt ist und da das Scroll rad bei Aion von meiner (Laser Trust) Maus nicht funktioniert (Funktioniert nur beim Spiel nicht) kann ich nicht rauszoomen... Bei Metin2 war das auch so aber da gab es ja noch die Buchstaben "r" und "f" ich habe versucht durch die Optionen das Zoomen auf Tasten zu legen finde aber keine...
Zoom problem
05/16/2011 - League of Legends - 14 Replies
Hallo. Ich kann seit der neu installation von LoL nichtmehr richtig rauszoomen http://img841.imageshack.us/img841/7650/unbenannt soj.jpg google hilft leider nichts & an denn optionen spieln auch nicht
Firefox Zoom Problem ;o
03/04/2011 - Technical Support - 38 Replies
Hey liebe Community also hab folgendes Problem mein browser hat die Einstellung 100% vermute ich aber epvp ist zu groß deshalb zoom ich das mit dem Mausrad und STRG bissel runter auf ~ 70 % aber wenn ich dann neu lade bwz die nächste Seite anschaue ist es wieder 100% kann man das irgentwie einstellen? Mfg
CID proxy problem solved here with zoom :D
03/21/2009 - CO2 Exploits, Hacks & Tools - 63 Replies
hey guys i know that CID not work . new patch updated so i made some SFX collection to solve ur problem without need to reinstall ur client just run ur need : 1: OldCID.exe << CIDProxy2.0alpha the old one maybe u need , cuz the bugs in the newest one CIDProxy2.01alpha like ( !ahunt - !aloot - dc - closing window - etc... ) .i added : (zoom , speed) >> . 2: CID4P5068.exe << CIDProxy2.01alpha the last one for fixing stamina problem otherwise u have some bugs on it as i said like (...
CE ZOOM HACK PROBLEM
02/12/2009 - Dekaron - 0 Replies
Delete



All times are GMT +2. The time now is 04:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.