Hi tj- Where does your code try to create 3 markers? And what is the Pic variable initialized to?
- pamela On Sun, May 17, 2009 at 1:02 PM, tj <[email protected]> wrote: > > Hi > > I am pretty new to Flash, as3 and the Google api...so not a great > beginning I know! > > I have the following code and 'simply' wish to add 3 more markers with > either tooltips or a label to show points of reference for the map - > i.e. pass the bus station is better if they can see the bus station on > the map. > > I have tried every which way possible but cannot get multiple markers > to display a label other than black which isn't very visible on top of > the icon. I have tried to include a stroke colour for the font but it > doesn't change. When I tried the tooltips they seem to be a long way > from the icon as well so not ideal either. > > As I say I am new to this so sure I'm doing something profoundly wrong > but could someone please advise (with code example if possible) how I > can acheive what seems to be quite a basic thing. Here is my code > which works fine so if anyone has any thoughts I would be most > grateful. > > import com.google.maps.Map; ; > import com.google.maps.MapEvent; > import com.google.maps.LatLng; > import com.google.maps.MapType; > > > //Import Controls > import com.google.maps.controls.MapTypeControl; > import com.google.maps.controls.ZoomControl; > import com.google.maps.controls.PositionControl; > import com.google.maps.controls.OverviewMapControl; > > > //Import Overlays - Markers etc > import com.google.maps.overlays.Marker; > import com.google.maps.overlays.MarkerOptions; > import com.google.maps.InfoWindowOptions; > > > var map:Map = new Map(); > map.key="REMOVED"; > var myMapSize:Point=new Point(400,400); > map.setSize(myMapSize); > map.addEventListener(MapEvent.MAP_READY, onMapReady); > this.addChild(map); > map.x=0; > map.y=0; > > var Pic; > > function onMapReady(event:MapEvent):void { > map.setCenter(new LatLng(12.517963,99.981186), 16, > MapType.HYBRID_MAP_TYPE); > map.addControl(new PositionControl()); > map.addControl(new ZoomControl()); > map.addControl(new MapTypeControl()); > map.addControl(new OverviewMapControl()); > > > var markerOptions:MarkerOptions = new MarkerOptions(); > markerOptions.icon=Pic; > markerOptions.tooltip="Oasis Bar"; > markerOptions.iconAlignment = > MarkerOptions.ALIGN_HORIZONTAL_CENTER; > markerOptions.iconOffset=new Point(2,2); > > > var marker:Marker=new Marker(map.getCenter(),markerOptions); > map.addOverlay(marker); > } > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
