Tobias:
Do you have a online example? I do not see problem with  my custom
map:
http://gmaps-utility-library-flash.googlecode.com/svn/trunk/examples/ArcGISLink/bin-release/StatePlane.html


On Aug 6, 7:26 am, tobias <tobias.pip...@dataprocess.de> wrote:
> Hello all,
>
> I've a problem with creating a custom MapType and can't figure out the
> reasons.
> First of all, my tile images are loaded and the application throws no
> error.
> But when zooming in, it seems that the last two zoom levels are
> overlaid. If I then change the maptype to for example satellite and
> back to my custom, all looks fine.
>
> So for example zoomin from level 18 to 19 the images cannot be watched
> clearly because there's still pixels left from the old zoom level.
>
> I'm using a Java-Servlet in Background which is loading and returning
> the data from the filesystem. The image tiles are PNGs.
>
> Here's the relevant code in short:
>
> The main mxml:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application
>         xmlns:mx="http://www.adobe.com/2006/mxml";
>     layout="absolute"
>     width="100%" height="100%"
>     viewSourceURL="srcview/index.html"
>     backgroundColor="#FFFFFF">
>
>         <mx:Script>
>                 <![CDATA[
>                         import com.google.maps.controls.MapTypeControl;
>                         import com.google.maps.MapTypeOptions;
>                         import tileLayer.PlantTileLayer;
>                         import com.google.maps.interfaces.ITileLayer;
>                         import com.google.maps.interfaces.IMapType;
>                         import com.google.maps.LatLng;
>                         import com.google.maps.Map;
>                         import com.google.maps.MapEvent;
>                         import com.google.maps.MapType;
>
>                         private var map:Map;
>
>                         public function onContinerInitialize( event:Event 
> ):void
>                         {
>                             map = new Map();
>                             map.key = "MyAPIKey";
>                             map.addEventListener( MapEvent.MAP_READY, 
> onMapReady );
>                             mapContainer.addChild( map );
>                         }
>
>                         public function onContainerResize( event:Event ):void
>                         {
>                             map.setSize( new Point( mapContainer.width,
> mapContainer.height ) );
>                         }
>
>                         private function onMapReady( event:Event ):void
>                         {
>
>                                 var layer: ITileLayer = new CustTileLayer();
>                                 var  layers : Array = new Array();
>                                 layers.push(layer);
>
>                                 var options : MapTypeOptions =  
> MapTypeOptions.getDefaultOptions
> ();
>                                 options.maxResolution = 19;
>                                 options.minResolution = 5;
>                                 var mapT: IMapType = new MapType(layers,
> MapType.NORMAL_MAP_TYPE.getProjection(), "CustomMap", options);
>
>                                 map.addMapType(mapT);
>                                 map.setMapType(mapT);
>                             map.enableScrollWheelZoom();
>                             map.addControl(new MapTypeControl());
>                             map.enableContinuousZoom();
>                             map.setCenter(new LatLng(38.897318, -77.035392), 
> 10);
>
>                         }
>
>                 ]]>
>         </mx:Script>
>
>         <mx:Panel
>                 title="Google Maps Sample"
>                 top="5" bottom="5" left="5" right="5">
>
>             <mx:UIComponent id="mapContainer"
>                 initialize="onContinerInitialize(event);"
>                 resize="onContainerResize(event)"
>                 width="100%" height="100%"/>
>
>         </mx:Panel>
>
> </mx:Application>
>
> And here's the load Function of my TileLayer
>
>         /**
>          * lädt eine Kachel vom angegebenen Server
>          *
>          * */
>         public override function loadTile(  tilePos:Point,
> zoom:Number):DisplayObject {
>                 var loader:Loader = new Loader();
>
>                 //Aufbereitung der Parameter
>                 var parameters : String =       "Z="+zoom+"&X="+tilePos.x
> +"&Y="+tilePos.y+"&layer="+this._layerName ;
>
>                 var tileUrl: String = this._server;
>
>                 //Registrierung von Fehlerfaellen
>                 loader.addEventListener(IOErrorEvent.IO_ERROR, errorH);
>                 loader.contentLoaderInfo.addEventListener
> (HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
>                 
> loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
> errorH)
>
>                 //erstellen und abesneden des Requests
>                 var req:URLRequest = URLRequestHelper.getUrlRequest(tileUrl,
> parameters);
>                 req.contentType = "image/png";
>
>                 var lala: Sprite = new Sprite();
>                 lala.addChild(loader);
>                 loader.load(req);
>
>             return lala;
>         }
>
> Any help would be very appreciated.
>
> thank you
>
> tobias
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to google-maps-api-for-flash@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api-for-flash+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to