ÿþ 
 T y p e . r e g i s t e r N a m e s p a c e ( " M y G M a p s " ) ;  
  
  
 v a r   M A P E V E N T K E Y S   =   {  
 	 O N M A P L O A D :   0 ,  
 	 O N S H O W H I N T :   1  
 } ;  
  
 v a r   C U R S O R _ M O V E   =   " m o v e " ;  
 v a r   C U R S O R _ D R A W   =   " c r o s s h a i r " ;  
 v a r   C U R S O R _ D E F A U L T   =   " d e f a u l t " ;  
  
  
 G L a t L n g B o u n d s . p r o t o t y p e . e x t e n d B y R a t i o   =   f u n c t i o n ( r a t i o )  
 {  
 	 / /   i n i t i a l i z e   b o u n d s   t o   b e   t h e   s a m e   a s   o r i g i n a l    
 	 v a r   l a r g e r B o u n d s   =   n e w   G L a t L n g B o u n d s (  
                           t h i s . g e t S o u t h W e s t ( ) ,   t h i s . g e t N o r t h E a s t ( ) ) ;  
 	 / /   g e t   l a t ,   l n g   o f   n o r t h   e a s t   a n d   s o u t h   w e s t    
 	 v a r   n o r t h E a s t L a t   =   t h i s . g e t N o r t h E a s t ( ) . l a t ( ) ;  
 	 v a r   n o r t h E a s t L n g   =   t h i s . g e t N o r t h E a s t ( ) . l n g ( ) ;  
 	 v a r   s o u t h W e s t L a t   =   t h i s . g e t S o u t h W e s t ( ) . l a t ( ) ;  
 	 v a r   s o u t h W e s t L n g   =   t h i s . g e t S o u t h W e s t ( ) . l n g ( ) ;  
 	 v a r   d i f f L a t   =   n o r t h E a s t L a t   -   s o u t h W e s t L a t ;  
 	 v a r   d i f f L n g   =   n o r t h E a s t L n g   -   s o u t h W e s t L n g ;  
 	 / /   m u l t i p l y   w i t h   r a t i o    
 	 n o r t h E a s t L a t   + =   d i f f L a t   *   r a t i o ;  
 	 s o u t h W e s t L a t   - =   d i f f L a t   *   r a t i o ;  
 	 n o r t h E a s t L n g   + =   d i f f L n g   *   r a t i o ;  
 	 s o u t h W e s t L n g   - =   d i f f L n g   *   r a t i o ;  
 	 / /   e x t e n d   n o r t h   e a s t    
 	 l a r g e r B o u n d s . e x t e n d ( n e w   G L a t L n g ( n o r t h E a s t L a t ,   n o r t h E a s t L n g ) ) ;  
 	 / /   e x t e n d   s o u t h   w e s t    
 	 l a r g e r B o u n d s . e x t e n d ( n e w   G L a t L n g ( s o u t h W e s t L a t ,   s o u t h W e s t L n g ) ) ;  
 	 r e t u r n   l a r g e r B o u n d s ;  
 }  
  
  
  
  
 M y G M a p s . G L a t L n g   =   f u n c t i o n ( )  
 {  
 	 t h i s . l a t   =   0 . 0 ;  
 	 t h i s . l n g   =   0 . 0 ;  
  
 	 t h i s . S e t G L a t L n g   =   f u n c t i o n ( g L a t L n g )  
 	 {  
 	 	 t h i s . l a t   =   g L a t L n g . l a t ( ) ;  
 	 	 t h i s . l n g   =   g L a t L n g . l n g ( ) ;  
 	 }  
  
 }  
  
  
 M y G M a p s . G B o u n d s   =   f u n c t i o n ( )  
 {  
 	 t h i s . s w   =   n e w   M y G M a p s . G L a t L n g ( ) ;  
 	 t h i s . n e   =   n e w   M y G M a p s . G L a t L n g ( ) ;  
  
 	 t h i s . S e t B o u n d   =   f u n c t i o n ( g L a t L n g )  
 	 {  
 	 	 t h i s . s w . S e t G L a t L n g ( g L a t L n g . g e t S o u t h W e s t ( ) ) ;  
 	 	 t h i s . n e . S e t G L a t L n g ( g L a t L n g . g e t N o r t h E a s t ( ) ) ;  
  
 	 }  
 }  
  
  
  
 M y G M a p s . G M a p P a r a m s   =   f u n c t i o n ( )  
 {  
  
 	 t h i s . m y V a l u e   =   ' 1 0 0 ' ;  
 	 t h i s . m y T e x t   =   ' H e l l o ' ;  
 	 t h i s . g B o u n d   =   n e w   M y G M a p s . G B o u n d s ( ) ;  
 	 t h i s . z o o m L e v e l   =   0 ;  
 	 t h i s . c e n t e r   =   n e w   M y G M a p s . G L a t L n g ( ) ;  
 	 t h i s . c l i c k P o i n t   =   n e w   M y G M a p s . G L a t L n g ( ) ;  
  
  
 	 t h i s . M y S e r i a l i z e   =   f u n c t i o n ( e v e n t N a m e )  
 	 {  
 	 	 v a r   j s o n S t r i n g   =   S y s . S e r i a l i z a t i o n . J a v a S c r i p t S e r i a l i z e r . s e r i a l i z e ( t h i s ) ;  
 	 	 r e t u r n   j s o n S t r i n g   +   " # ! # "   +   e v e n t N a m e   +   " # ! # "   +   n e w   D a t e ( ) . g e t T i m e ( ) ;  
 	 }  
  
  
  
  
  
 }  
  
 M y G M a p s . M a p M o d e s   =   {  
 	 B R O W S E :   1 ,  
 	 D R O P W P :   2  
 }  
  
  
  
  
  
 M y G M a p s . M y G M a p C o n t r o l   =   f u n c t i o n   ( s t a r t u p O b j )  
 {  
         / /   I n i t i a l i z e   a s   a   b a s e   c l a s s . Í  
         / /   M y G M a p s . M y G M a p C o n t r o l . i n i t i a l i z e B a s e ( t h i s ) ;  
  
         t h i s . I n i t E v e n t s ( ) ;  
  
         t h i s . s t a r t P a r a m s   =   s t a r t u p O b j ;  
         t h i s . m a p D i v   =   $ g e t ( t h i s . s t a r t P a r a m s . d i v I D ) ;  
         / / t h i s . g M a p   =   n u l l ;  
         t h i s . g M a p   =   n e w   G M a p 2 ( t h i s . m a p D i v ,   {   d r a g g a b l e C u r s o r :   C U R S O R _ D E F A U L T ,   d r a g g i n g C u r s o r :   C U R S O R _ M O V E   } ) ;  
  
         / / t h i s . m i l e S t o n e s   =   n e w   M i l e S t o n e s ( t h i s . g M a p ) ;  
  
  
         / / t h i s . c e n t e r P o i n t   =   n e w   G L a t L n g ( 4 7 . 4 2 8 0 8 7 2 6 1 7 1 4 2 5 , 1 9 . 1 3 8 1 8 3 5 9 3 7 5 ) ;  
         t h i s . c e n t e r P o i n t   =   n e w   G L a t L n g ( t h i s . s t a r t P a r a m s . c e n t e r P o i n t . l a t ,   t h i s . s t a r t P a r a m s . c e n t e r P o i n t . l n g ) ;  
         t h i s . z o o m L e v e l   =   t h i s . s t a r t P a r a m s . z o o m L e v e l ;  
         t h i s . r e s o u r c e D i r   =   t h i s . s t a r t P a r a m s . r e s o u r c e D i r ;  
  
         t h i s . o v e r V i e w C t r l   =   n e w   G O v e r v i e w M a p C o n t r o l ( ) ;  
         t h i s . m a p T y p e C t r l   =   n e w   G M a p T y p e C o n t r o l ( ) ;  
         t h i s . l a r g e M a p C o n t r o l 3 D   =   n e w   G L a r g e M a p C o n t r o l 3 D ( )  
  
         t h i s . b u s y I m g   =   n e w   I m a g e ( ) ;  
         t h i s . b u s y I m g . s r c   =   t h i s . r e s o u r c e D i r   +   " / i m a g e s / b u s y 2 . g i f " ;  
         t h i s . b u s y W   =   n e w   G O v e r l a y M e s s a g e ( t h i s . m a p D i v ,   t h i s . b u s y I m g ) ;  
         t h i s . a p i K e y   =   t h i s . s t a r t P a r a m s . a p i K e y ;  
  
         / *   W i l l   b e   u s e d   a f t e r   r e f a c t o r i n g   o f   q u i c k f i x   f o r   m a p t y p e s   b e l o w  
         i f   ( s t a r t P a r a m s . S h o w M a p T y p e s C o n t r o l )   {  
  
         i f   ( s t a r t P a r a m s . I s M a p C o n t r o l H i e r a c h i c a l )  
         t h i s . g M a p . a d d C o n t r o l ( n e w   G H i e r a r c h i c a l M a p T y p e C o n t r o l ( ) ) ;  
         e l s e  
         t h i s . g M a p . a d d C o n t r o l ( n e w   G M a p T y p e C o n t r o l ( ) ) ;  
         }  
  
         i f   ( s t a r t P a r a m s . S h o w Z o o m C o n t r o l )  
         t h i s . g M a p . a d d C o n t r o l ( n e w   G L a r g e M a p C o n t r o l ( ) ) ;  
  
         i f   ( s t a r t P a r a m s . I s S c r o l l W h e e l Z o o m E n a b l e d )  
         t h i s . g M a p . e n a b l e S c r o l l W h e e l Z o o m ( ) ;  
  
  
         * /  
  
  
  
  
         t h i s . g P a r a m s   =   n e w   M y G M a p s . G M a p P a r a m s ( ) ;  
  
         i f   ( ! G B r o w s e r I s C o m p a t i b l e ( ) )  
         {  
                 a l e r t ( " I n c o m p a t i b l e   B r o w s e r   ! ! ! " ) ;  
                 e x i t ;  
         }  
  
  
         / / T O D O :   Q u i c k & d i r t y   m u s t   b e   r e f a c t o r e d !   u s e   G M a p U I O p t i o n s  
         t h i s . g M a p . a d d C o n t r o l ( t h i s . m a p T y p e C t r l ) ;  
         t h i s . g M a p . a d d M a p T y p e ( G _ P H Y S I C A L _ M A P ) ;  
         t h i s . g M a p . a d d M a p T y p e ( G _ S A T E L L I T E _ 3 D _ M A P ) ;  
          
         t h i s . g M a p . a d d C o n t r o l ( t h i s . l a r g e M a p C o n t r o l 3 D ) ;  
         t h i s . g M a p . a d d C o n t r o l ( t h i s . o v e r V i e w C t r l ) ;  
         t h i s . g M a p . e n a b l e S c r o l l W h e e l Z o o m ( ) ;  
         t h i s . g M a p . e n a b l e C o n t i n u o u s Z o o m ( ) ;  
          
         / / Z o o m   f r o m   b o u n d R e c t  
  
         i f   ( t h i s . z o o m L e v e l   <   0 )  
         {  
                 v a r   b o u n d s   =   n e w   G L a t L n g B o u n d s ( ) ;  
                 b o u n d s . e x t e n d ( n e w   G L a t L n g ( t h i s . s t a r t P a r a m s . b o u n d R e c t . s w . l a t ,   t h i s . s t a r t P a r a m s . b o u n d R e c t . s w . l n g ) ) ;  
                 b o u n d s . e x t e n d ( n e w   G L a t L n g ( t h i s . s t a r t P a r a m s . b o u n d R e c t . n e . l a t ,   t h i s . s t a r t P a r a m s . b o u n d R e c t . n e . l n g ) ) ;  
                 t h i s . c e n t e r P o i n t   =   b o u n d s . g e t C e n t e r ( ) ;  
                 t h i s . z o o m L e v e l   =   t h i s . g M a p . g e t B o u n d s Z o o m L e v e l ( b o u n d s ) ;  
  
         }  
  
         / / T O D O :   m a k e   a   p r e f e r e n c e   f o r   m a p t y p e  
         t h i s . g M a p . s e t M a p T y p e ( G _ P H Y S I C A L _ M A P ) ;  
         t h i s . s e t M a x Z o o m C e n t e r ( t h i s . c e n t e r P o i n t ,   t h i s . z o o m L e v e l ) ;  
         / / 	 t h i s . g M a p . s e t C e n t e r ( t h i s . c e n t e r P o i n t ,   t h i s . z o o m L e v e l ,   G _ P H Y S I C A L _ M A P ) ;  
  
         t h i s . g M M a n a g e r   =   n e w   G M a r k e r M a n a g e r ( t h i s . g M a p ,   {   t r a c k M a r k e r s :   t r u e   } ) ;  
  
         i f   ( t h i s . s t a r t P a r a m s . K M L U r l   ! =   " " )  
         {  
                 / / e n é l k ü l   e l s z á l l   - - -   k e l l   e g y   z ó ó m   e l Qt t e    
  
                 t h i s . A d d K M L O v e r l a y ( t h i s . s t a r t P a r a m s ) ;  
         }  
  
         / / t h i s . g M a p . u s a g e T y p e = " p " ;   / / o = o v e r v i e w   p = b l o w u p  
  
  
         / /   t h i s . g M a p . s e t C e n t e r ( n e w   G L a t L n g (   4 3 . 9 0 7 7 8 7 , - 7 9 . 3 5 9 7 4 1 ) ,   2 ) ;  
  
         / / *   E v e n t   b i n d i n g s  
  
         G E v e n t . b i n d ( t h i s . g M a p ,   " c l i c k " ,   t h i s ,   t h i s . o n M a p C l i c k ) ;  
         / / G E v e n t . a d d D o m L i s t e n e r ( t h i s . g M a p ,   ' s i n g l e r i g h t c l i c k ' ,   f u n c t i o n ( )   {   a l e r t ( ' c o n t e t x C l i c k e d ' ) ;   } ) ;  
  
         / /   = = = = = =   s e t   u p   m a r k e r   m o u s e o v e r   t o o l t i p   d i v   = = = = = =  
         t h i s . t o o l t i p   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . s t a r t P a r a m s . d i v I D ) . a p p e n d C h i l d ( t h i s . t o o l t i p ) ;  
         t h i s . t o o l t i p . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
  
  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . s e t M a x Z o o m C e n t e r   =   f u n c t i o n ( l a t l n g ,   z o o m l e v e l )  
 {  
 	 v a r   m a p   =   t h i s . g M a p ;  
 	 m a p . g e t C u r r e n t M a p T y p e ( ) . g e t M a x Z o o m A t L a t L n g ( l a t l n g ,   f u n c t i o n ( r e s p o n s e )  
 	 {  
 	 	 i f   ( r e s p o n s e   & &   r e s p o n s e [ ' s t a t u s ' ]   = =   G _ G E O _ S U C C E S S )  
 	 	 {  
 	 	 	 m a p . s e t C e n t e r ( l a t l n g ,   M a t h . m i n ( r e s p o n s e [ ' z o o m ' ] ,   z o o m l e v e l ) ) ;  
 	 	 }  
 	 } ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . I n i t E v e n t s   =   f u n c t i o n ( )  
 {  
 	 t h i s . a r r R e g E v e n t   =   n e w   A r r a y ( ) ;  
 	 v a r   a r r   =   t h i s . a r r R e g E v e n t ;  
 	 / / ü r e s   l i s t á k    
 	 $ . e a c h ( M A P E V E N T K E Y S ,   f u n c t i o n ( i ,   v a l )  
 	 {  
 	 	 a r r . p u s h ( n e w   A r r a y ( ) ) ;  
 	 } ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . b i n d E v e n t   =   f u n c t i o n ( e v e n t K e y ,   f u n c )  
 {  
 	 t h i s . a r r R e g E v e n t [ e v e n t K e y ] . p u s h ( f u n c ) ;  
 }  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . u n B i n d E v e n t   =   f u n c t i o n ( e v e n t K e y ,   f u n c )  
 {  
 	 t h i s . a r r R e g E v e n t [ e v e n t K e y ] . s l i c e ( f u n c ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . c a l l E v e n t   =   f u n c t i o n ( e v e n t K e y ,   m a p C o n t e x t ,   m a p C o n t e x t 2 )  
 {  
  
 	 f o r   ( v a r   i   =   0 ;   i   <   t h i s . a r r R e g E v e n t [ e v e n t K e y ] . l e n g t h ;   i + + )  
 	 {  
 	 	 i f   ( t y p e o f   m a p C o n t e x t 2   = = =   ' u n d e f i n e d ' )   {   t h i s . a r r R e g E v e n t [ e v e n t K e y ] [ i ] ( m a p C o n t e x t ) ;   }  
 	 	 e l s e   t h i s . a r r R e g E v e n t [ e v e n t K e y ] [ i ] ( m a p C o n t e x t ,   m a p C o n t e x t 2 ) ;  
  
 	 }  
 }  
  
  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . C o l l e c t G P a r a m s   =   f u n c t i o n ( )  
 {  
  
 	 t h i s . g P a r a m s . m y v a l u e   =   ' X X ' ;  
 	 t h i s . g P a r a m s . m y t e x t   =   ' t x t ' ;  
 	 t h i s . g P a r a m s . g B o u n d . S e t B o u n d ( t h i s . g M a p . g e t B o u n d s ( ) ) ;  
 	 t h i s . g P a r a m s . z o o m L e v e l   =   t h i s . g M a p . g e t Z o o m ( ) ;  
 	 t h i s . g P a r a m s . c e n t e r . S e t G L a t L n g ( t h i s . g M a p . g e t C e n t e r ( ) ) ;  
 	 / / t h i s . g P a r a m s . b o u n d . x = 7 ;  
  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . A d d S i m p l e G M a r k e r   =   f u n c t i o n ( l a t ,   l n g )  
 {  
  
  
 	 v a r   m a r k e r   =   n e w   G M a r k e r ( n e w   G L a t L n g ( l a t ,   l n g ) ) ;  
 	 / / t h i s . g M M a n a g e r . a d d M a r k e r ( m a r k e r , 0 , 1 6 ) ;  
 	 / / t h i s . g M M a n a g e r . r e f r e s h ( ) ;  
 	 t h i s . g M a p . a d d O v e r l a y ( m a r k e r ) ;  
 	 r e t u r n   m a r k e r ;  
  
 }  
  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . s h o w T o o l t i p   =   f u n c t i o n ( m a r k e r ,   l a t l o n )  
 {  
 	 v a r   p o i n t   =   t h i s . g M a p . g e t C u r r e n t M a p T y p e ( ) . g e t P r o j e c t i o n ( ) . f r o m L a t L n g T o P i x e l ( t h i s . g M a p . g e t B o u n d s ( ) . g e t S o u t h W e s t ( ) ,   t h i s . g M a p . g e t Z o o m ( ) ) ;  
 	 v a r   o f f s e t   =   t h i s . g M a p . g e t C u r r e n t M a p T y p e ( ) . g e t P r o j e c t i o n ( ) . f r o m L a t L n g T o P i x e l ( l a t l o n ,   t h i s . g M a p . g e t Z o o m ( ) ) ;  
 	 v a r   a n c h o r   =   m a r k e r . g e t I c o n ( ) . i c o n A n c h o r ;  
 	 v a r   w i d t h   =   m a r k e r . g e t I c o n ( ) . i c o n S i z e . w i d t h ;  
 	 v a r   p o s   =   n e w   G C o n t r o l P o s i t i o n ( G _ A N C H O R _ B O T T O M _ L E F T ,   n e w   G S i z e ( o f f s e t . x   -   p o i n t . x   -   a n c h o r . x   +   w i d t h ,   - o f f s e t . y   +   p o i n t . y   +   a n c h o r . y ) ) ;  
 	 p o s . a p p l y ( t h i s . t o o l t i p ) ;  
 	 t h i s . t o o l t i p . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ;  
 }  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . A d d G M a r k e r   =   f u n c t i o n ( l a t ,   l n g ,   g i c o n ,   i s d r a g ,   f u n c _ o r _ h i n t ,   z P )  
 {  
  
 	 v a r   t h i s o b j   =   t h i s ;  
 	 v a r   t i t   =   " " ;  
 	 i f   ( t y p e o f   f u n c _ o r _ h i n t   = = =   ' s t r i n g ' )   {   t i t   =   f u n c _ o r _ h i n t ;   }  
  
 	 v a r   m a r k e r   =   z P   ?  
                 n e w   G M a r k e r ( n e w   G L a t L n g ( l a t ,   l n g ) ,   {   i c o n :   g i c o n ,   d r a g g a b l e :   i s d r a g ,   t i t l e :   t i t ,   z I n d e x P r o c e s s :   z P   } )   :  
                 n e w   G M a r k e r ( n e w   G L a t L n g ( l a t ,   l n g ) ,   {   i c o n :   g i c o n ,   d r a g g a b l e :   i s d r a g ,   t i t l e :   t i t   } ) ;  
  
  
 	 / / v a r   m a r k e r   =   n e w   G M a r k e r ( n e w   G L a t L n g ( l a t ,   l n g ) , g i c o n ) ;  
 	 / / t h i s . g M M a n a g e r . a d d M a r k e r ( m a r k e r , 0 , 1 6 ) ;  
 	 / / t h i s . g M M a n a g e r . r e f r e s h ( ) ;  
 	 t h i s . g M a p . a d d O v e r l a y ( m a r k e r ) ;  
  
 	 i f   ( t y p e o f   f u n c _ o r _ h i n t   = = =   ' f u n c t i o n ' )  
 	 {  
 	 	 G E v e n t . a d d L i s t e n e r ( m a r k e r ,  
                         " m o u s e o v e r " ,  
                         f u n c t i o n ( l a t l o n )  
                         {  
                         	 t h i s o b j . c a l l E v e n t ( M A P E V E N T K E Y S . O N S H O W H I N T ,   m a r k e r ,   t h i s o b j . t o o l t i p ) ;  
                         	 t h i s o b j . s h o w T o o l t i p ( m a r k e r ,   l a t l o n ) ;  
                         }  
                 ) ;  
  
 	 	 G E v e n t . a d d L i s t e n e r (  
                 m a r k e r ,  
                 " m o u s e o u t " ,  
                 f u n c t i o n ( )   {   t h i s o b j . t o o l t i p . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;   }  
                 ) ;  
  
 	 	 t h i s . b i n d E v e n t ( M A P E V E N T K E Y S . O N S H O W H I N T ,   f u n c _ o r _ h i n t ) ;  
 	 }  
  
 	 r e t u r n   m a r k e r ;  
 }  
  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . m a p I D   =   f u n c t i o n ( )  
 {  
 	 r e t u r n   t h i s . s t a r t P a r a m s . d i v I D ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . S h o w   =   f u n c t i o n ( )  
 {  
 	 t h i s . m a p D i v . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 / / a l e r t ( " f f " ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . S h o w B u s y   =   f u n c t i o n ( )  
 {  
  
 	 t h i s . b u s y W . S e t ( " " ) ;  
 	 / / a l e r t ( " f f " ) ;  
 }  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . C l e a r B u s y   =   f u n c t i o n ( )  
 {  
  
 	 t h i s . b u s y W . C l e a r ( ) ;  
 	 / / a l e r t ( " f f " ) ;  
 }  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . Z o o m T o W i n d o w   =   f u n c t i o n ( p a r )  
 {  
 	 / / r e t u r n ;  
 	 v a r   b o u n d s   =   n e w   G L a t L n g B o u n d s ( ) ;  
 	 b o u n d s . e x t e n d ( n e w   G L a t L n g ( p a r . s w . l a t ,   p a r . s w . l n g ) ) ;  
 	 b o u n d s . e x t e n d ( n e w   G L a t L n g ( p a r . n e . l a t ,   p a r . n e . l n g ) ) ;  
 	 t h i s . g M a p . s e t Z o o m ( t h i s . g M a p . g e t B o u n d s Z o o m L e v e l ( b o u n d s ) ) ;  
 	 t h i s . g M a p . s e t C e n t e r ( b o u n d s . g e t C e n t e r ( ) ) ;  
  
 }  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . S h o w P l i n e   =   f u n c t i o n ( p l i n e ,   z o o m t o )  
 {  
 	 t h i s . g M a p . a d d O v e r l a y ( p l i n e ) ;  
 	 i f   ( z o o m t o )  
 	 {  
 	 	 v a r   b o u n d s   =   p l i n e . g e t B o u n d s ( ) ;  
 	 	 t h i s . g M a p . s e t Z o o m ( t h i s . g M a p . g e t B o u n d s Z o o m L e v e l ( b o u n d s ) ) ;  
 	 	 t h i s . g M a p . s e t C e n t e r ( b o u n d s . g e t C e n t e r ( ) ) ;  
  
 	 }  
  
 	 / /         v a r   m i l e s   =   t h i s . m i l e S t o n e s ;  
 	 / /         / / a d d i n g   m i l e s t o n e s  
 	 / /         f o r   ( v a r   i   =   0 ;   i   <   m i l e s . l e n g t h ;   i + + )  
 	 / /                 t h i s . g M a p . r e m o v e O v e r l a y ( m i l e s [ i ] ) ;  
  
 	 t h i s . m i l e S t o n e s   =   n e w   M i l e S t o n e s ( t h i s . g M a p ,   2 0 ,   p l i n e ) ;  
 	 / / t h i s . m i l e S t o n e s . r e d r a w ( ) ;  
  
 	 / /         f o r   ( v a r   i   =   0 ;   i   <   m i l e s . l e n g t h ;   i + + )  
 	 / /                 t h i s . g M a p . a d d O v e r l a y ( m i l e s [ i ] ) ;  
  
 	 r e t u r n   t h i s . g M a p . g e t B o u n d s ( ) ;  
  
 }  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . A d d K M L O v e r l a y   =   f u n c t i o n ( p a r )  
 {  
  
  
 	 v a r   g g M a p   =   t h i s . g M a p ;  
 	 / / p a r . K M L U r l = " h t t p : / / 8 4 . 0 . 1 3 0 . 1 1 3 / g e o t r a c k / u r o m . k m l " ;  
 	 / / p a r . K M L U r l = " h t t p : / / g u b o . m y i p . h u / g e o t r a c k / u r o m . k m l " ;  
  
 	 t h i s . b u s y W . S e t ( " Ú t v o n a l   b e t ö l t é s   . . . " ) ;  
 	 v a r   b w   =   t h i s . b u s y W ;  
 	 v a r   l a s t K M L   =   ( p a r . Z o o m T o O b j e c t   ?   n e w   G G e o X m l ( p a r . K M L U r l ,  
                                                                         f u n c t i o n ( )  
                                                                         {  
  
                                                                         	 i f   ( l a s t K M L . l o a d e d C o r r e c t l y ( ) )  
                                                                         	 {  
                                                                         	 	 l a s t K M L . g o t o D e f a u l t V i e w p o r t ( g g M a p ) ;  
                                                                         	 	 b w . C l e a r ( ) ;  
                                                                         	 }  
                                                                         	 e l s e  
                                                                         	 {  
                                                                         	 	 a l e r t ( " E r r o r   l o a d i n g   K M L   . . . " ) ;  
                                                                         	 	 b w . C l e a r ( ) ;  
                                                                         	 }  
                                                                         }  
                                                                         )   :   n e w   G G e o X m l ( p a r . K M L U r l )  
                                                                 ) ;  
 	 t h i s . S h o w ( ) ;  
 	 / / a l e r t ( t h i s . g M a p ) ;  
 	 t h i s . g M a p . a d d O v e r l a y ( l a s t K M L ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . H e l l o   =   f u n c t i o n ( p a r )  
 {  
 	 a l e r t ( p a r . l a t ) ;  
 }  
  
  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . T e s t   =   f u n c t i o n ( p a r )  
 {  
  
  
 	 a l e r t ( t h i s . g M a p . g e t Z o o m ( ) ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . S h o w M a p   =   f u n c t i o n ( s h o w P a r )  
 {  
  
 }  
  
  
 / / e z   a z   a s y n c   c a l l b a c k  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . C a l l B a c k A s y n c   =   f u n c t i o n ( a r g s )  
 {  
  
 	 i f   ( a r g s   ! =   " " )  
 	 {  
 	 	 e v a l ( a r g s ) ;  
 	 }  
  
 }  
  
  
 / / U p d a t e p a n e l e s   A s y n c   p o s t b a c k  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . F i r e S e r v e r E v e n t   =   f u n c t i o n ( e v e n t N a m e )  
 {  
 	 $ g e t ( t h i s . s t a r t P a r a m s . h i d d e n I D ) . i n n e r T e x t   =   t h i s . g P a r a m s . M y S e r i a l i z e ( e v e n t N a m e ) ;  
 	 _ _ d o P o s t B a c k ( t h i s . s t a r t P a r a m s . h i d d e n I D ,   ' ' ) ;  
 }  
  
 / / A s y n c C a l l b a c k e s    
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . F i r e S e r v e r E v e n t A s y n c   =   f u n c t i o n ( e v e n t N a m e )  
 {  
 	 / / I t t   h i v j a   m e g   a   b e r e g i s z t r á l t   A j a x o s   S e r v e r   O l d a l t   a   t h i s   =   g m a p   - - -   c o n t e x t b e   f o g j u k   b e h i v n i   a    
 	 / /   a   c a l l b a c k e t    
 	 C a l l G M a p A s y n c ( t h i s . g P a r a m s . M y S e r i a l i z e ( e v e n t N a m e ) ,   t h i s ) ;  
  
 }  
  
  
  
  
 M y G M a p s . M y G M a p C o n t r o l . p r o t o t y p e . o n M a p C l i c k   =   f u n c t i o n ( m a r k e r ,   p o i n t )  
 {  
 	 t h i s . C o l l e c t G P a r a m s ( ) ;  
 	 i f   ( m a r k e r )  
 	 {  
 	 }  
 	 e l s e  
 	 {  
 	 	 t h i s . g P a r a m s . c l i c k P o i n t . S e t G L a t L n g ( p o i n t ) ;  
 	 	 i f   ( t h i s . s t a r t P a r a m s . O n M a p C l i c k H a n d l e d )   {   t h i s . F i r e S e r v e r E v e n t ( " o n G M a p C l i c k " ) ;   }  
 	 	 i f   ( t h i s . s t a r t P a r a m s . O n M a p C l i c k H a n d l e d A s y n c )   {   t h i s . F i r e S e r v e r E v e n t A s y n c ( " o n G M a p C l i c k A s y n c " ) ;   }  
 	 	 / / t h i s . g M a p . a d d O v e r l a y ( n e w   G M a r k e r ( p o i n t ) ) ;  
 	 }  
  
  
 }  
  
  
  
 / / e z   j ö n   d i r e k t e   a   s z e r v e r t o l                      
 f u n c t i o n   G M a p A s y n c C a l l b a c k ( a r g s ,   c o n t e x t )  
 {  
 	 / /   a   c o n t e x t   p o n t   a   M y G M a p C o n t r o l   l e s z  
 	 c o n t e x t . C a l l B a c k A s y n c ( a r g s ) ;  
 }  
  
 / / * * * * * * * * * * * * * *   S t a r t   M a p  
  
 M y G M a p s . m a p A r r   =   n e w   A r r a y ( ) ;  
 M y G M a p s . o n L o a d F u n c S o u r c e A r r   =   n e w   A r r a y ( ) ;  
  
 M y G M a p s . S t a r t G M a p   =   f u n c t i o n ( j s o n S t a r t u p O b j e c t )  
 {  
 	 v a r   o   =   e v a l ( " ( "   +   j s o n S t a r t u p O b j e c t   +   " ) " ) ;  
 	 g m   =   n e w   M y G M a p s . M y G M a p C o n t r o l ( o ) ;  
 	 t h i s . m a p A r r . p u s h ( g m ) ;  
 	 f o r   ( v a r   i   =   0 ;   i   <   M y G M a p s . o n L o a d F u n c S o u r c e A r r . l e n g t h ;   i + + )  
 	 {  
 	 	 G E v e n t . t r i g g e r ( M y G M a p s . o n L o a d F u n c S o u r c e A r r [ i ] ,   " l o a d M y G M a p " ) ;  
 	 }  
 }  
  
 M y G M a p s . F i n d M a p   =   f u n c t i o n ( m p I D )  
 {  
 	 i f   ( m p I D   = =   " " )  
 	 {  
 	 	 / / i l y e n k o r   a z   e l s Q   
 	 	 r e t u r n   t h i s . m a p A r r [ 0 ] ;  
 	 }  
 	 f o r   ( i   =   0 ;   i   <   t h i s . m a p A r r . l e n g t h ;   i + + )  
 	 {  
  
 	 	 i f   ( t h i s . m a p A r r [ i ] . m a p I D ( )   = =   m p I D )  
 	 	 {  
 	 	 	 r e t u r n   t h i s . m a p A r r [ i ] ;  
 	 	 }  
 	 }  
 	 r e t u r n   n u l l ;  
 }  
  
 M y G M a p s . F i r e P r o c   =   f u n c t i o n ( m a p I D ,   p r o c N a m e ,   p r o c P a r a m s )  
 {  
  
 	 g m a p   =   t h i s . F i n d M a p ( m a p I D ) ;  
 	 v a r   o   =   e v a l ( " ( "   +   p r o c P a r a m s   +   " ) " ) ;  
  
 	 e v a l ( " g m a p . "   +   p r o c N a m e   +   " ( o ) " ) ;  
 }  
  
 M y G M a p s . A d d S i m p l e G M a r k e r   =   f u n c t i o n ( m a p I D ,   l a t ,   l n g )  
 {  
 	 g m a p   =   t h i s . F i n d M a p ( m a p I D ) ;  
 	 r e t u r n   g m a p . A d d S i m p l e G M a r k e r ( l a t ,   l n g ) ;  
 }  
  
  
 M y G M a p s . M y G M a p C o n t r o l . r e g i s t e r C l a s s ( ' M y G M a p s . M y G M a p C o n t r o l ' ,   n u l l ,   S y s . I D i s p o s a b l e ) ;  
 / /   N o t i f y   S c r i p t M a n a g e r   t h a t   t h i s   i s   t h e   e n d   o f   t h e   s c r i p t .  
 i f   ( t y p e o f   ( S y s )   ! = =   ' u n d e f i n e d ' )   S y s . A p p l i c a t i o n . n o t i f y S c r i p t L o a d e d ( ) ;  
  
  
  
  
 
