Thanks Pamela! I started from your code and the Lynx map and put it together with the basic flash example like the below.
One further question, how can I adjust the alpha of my custom tile layer after it has been created? Can I access some display object or foreground property of the tile layer so that the user can adjust alpha with some buttons? looking for code like: tileLayers[1].setAlpha (.5); Here's the result of my test in progress, by the way http://www.phillippond.com/mp For now its using the Lynx map's tiles, so you've got to go to Tasmania to see it. Phillip import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; import mannahatta.*; var map:Map = new Map(); map.key = "ABQIAAAA-8ZzjqcfxFyZOipI85E4PBRN9D3T7p8XCefiKX6nnmQbxMyh1hTbw6ykiaJNFdSZCo- UJXuqmd3Nkg"; map.setSize(new Point(stage.stageWidth, stage.stageHeight)); map.addEventListener(MapEvent.MAP_READY, onMapReady); this.addChild(map); function onMapReady(event:Event):void { /* HYBRID_MAP_TYPE has default layers 0: Satellite 1: Streets, Labels */ // Setup TileLayers in desired Z order var manLayer:MannahattaTileLayer = new MannahattaTileLayer(); var tileLayers:Array = new Array(); tileLayers[0] = MapType.HYBRID_MAP_TYPE.getTileLayers()[0]; tileLayers[1] = manLayer; tileLayers[2] = MapType.HYBRID_MAP_TYPE.getTileLayers()[1]; // Create MapType var mannahattaMapType:MapType = new MapType(tileLayers, MapType.HYBRID_MAP_TYPE.getProjection(),"mannahattaMapType"); map.addMapType(mannahattaMapType); map.setMapType(mannahattaMapType); } On Apr 5, 3:44 am, pamela fox <[email protected]> wrote: > Hi Phillip- > I would recommend using TileLayerOverlay for the second two layers. After > creating the map type, use code like: > > var hybridTileLayers = MapType.HYBRID_MAP_TYPE.getTileLayers(); > var customTileLayerOverlay = new TileLayerOverlay(new CustomTileLayer(), > 256, map.MERCATOR_PROJECTION); > map.addOverlay(customTileLayerOverlay); > map.addOverlay(hybridTileLayers[1]); > > A few examples of custom TileLayer code are in the demo > gallery:http://code.google.com/apis/maps/documentation/flash/demogallery.html...http://code.google.com/apis/maps/documentation/flash/demogallery.html... > > - pamela > > On Thu, Apr 2, 2009 at 1:12 PM, CaptainHudson <[email protected]>wrote: > > > > > Can someone point me in the right direction for some research or a > > good .fla example file of a map with custom tiles? I'm not actually > > sure if that is even what to call the thing I need. To describe it > > with two more specific requirements: > > 1. I'm looking for a flash example (not flex) for building a map with > > custom tile layers > > 2. What is the correct terminology (custom tile layer, > > tileLayerOverlay, customOverlay ?) for the following scenario: > > - a custom map of SATELLITE_MAP_TYPE (I created a custom simply > > because I need to limit the zoom levels) > > - with a layer of custom tiles on top of this ( I need to be able to > > control transparency of this layer for the interactive objectives) > > - with the street map (google's) on top of this > > > thanks > > Phillip --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
