Thanks

It just makes no sense at all.
I used another example for using customContent to see if it was the
way I was sending an image, as soon as I replaced a hard coded image
with my generated string it failed. I can see that it is picking up
1.jpg with no leading or trailing spaces.
If I put the 1.jpg file in the same folder as the flash file it makes
no difference.

Testing customContent way the code looks like this for my one test
marker.
Whenever I click the marker nothing loads up, I just get a 'waiting
for ...' status in my browser and nothing ever happens. If I hard code
the image into the URLRequest then it will load. It's the exact same
problem still.

var marker2:Marker = new Marker(new LatLng(28,-90));

              marker2.addEventListener(MapMouseEvent.CLICK,
function(e:Event):void {
                var request:URLRequest = new
URLRequest(locationImg[0].toString());
                var imageLoader:Loader = new Loader();
 
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
function(event:Event):void {
                    var width:Number = imageLoader.width;
                      var height:Number = imageLoader.height;
                      var options2:InfoWindowOptions = new
InfoWindowOptions({
                          customContent: imageLoader,
                          customOffset: new Point(200, 150),
                          customCloseRect: new Rectangle(140, 27, 25,
20)});
                      marker2.openInfoWindow(options2);
                  });
                  imageLoader.load(request);
              });
            this.map.addOverlay(marker2);


Thanks
Aaron




On Feb 4, 1:48 pm, Daniel <[email protected]> wrote:
> I'll look at it again. Did see that in the code you posted.
> On Feb 3, 2011 5:22 PM, "otto" <[email protected]> wrote:
>
> > How so?
>
> > Currently it's this:
>
> > for(var i:int = 0; i < xml.firstChild.childNodes.length; i++){
> > locationImg[i] =
> > xml.firstChild.childNodes[i].childNodes[3].toString();
> > }
>
> > On Feb 4, 9:59 am, Daniel <[email protected]> wrote:
> >> The element where you keep the name of your image file is different then
> how
> >> you reference it in your code
> >> On Feb 1, 2011 9:04 PM, "otto" <[email protected]> wrote:
>
> >> > Hi guys
>
> >> > Just trying to work out an annoying bug.
> >> > When I insert an img tag with a hard coded url - the code below works.
> >> > If I generate a url src from my xml file then it completely fails to
> >> > display anything in the contentHTML area. However if I simply send the
> >> > url as plain text (not wrapped in the <img> tag) then I see the url is
> >> > correct.
>
> >> > Any ideas?
>
> >> > EG this is what I hard code string to be: <img src='http://
> >> >www.hotondo.com.au/assets/images/hugo/1.jpg'> which shows the image.
> >> > If i generate it from my xml file, it prints out as
> >> >http://www.hotondo.com.au/assets/images/hugo/1.jpgwhichis the same.
> >> > If I then make it wrap the string in the img tag then I get nothing
> >> > outputting.
>
> >> > The interesting thing is if I put strImgDesc before the img tag I see
> >> > the description display, if I put it after then no content is
> >> > displayed at all??
>
> >> > Here's my code to generate the image links from an xml file
> >> > for(var j:int = 0; j < totalLocations; j++){
> >> >                var strLocation:String = locationTitle[j];
> >> >                var strImg:String = locationImg[j].toString();
> >> >                var strImgDesc:String = locationImgDesc[j];
>
> >> >                // these variables hold formatting information for the
> info
> >> windows
> >> >                var strHtml:String = "<img src='" + strImagePath +
> strImg +
> >> "' /
> >> > ><br>" + strImgDesc;
>
> >> >                createMarker(new LatLng(locationLat[j],locationLong[j]),
> >> strHtml,
> >> > strLocation);
> >> >        }
>
> >> > And here's the createMarker code which is working perfectly (besides
> >> > the image)
>
> >> > var mylocalmarker = new Marker(latlng, new MarkerOptions({icon:new
> >> > marker(),tooltip: strTitle}));
>
> >> > mylocalmarker.addEventListener(MapMouseEvent.CLICK,
> >> > function(e:MapMouseEvent):void {;
> >> >            mylocalmarker.openInfoWindow(new
> >> > InfoWindowOptions({hasShadow:false, height:280, width:280,
> >> > titleHTML:"<b>Hugo in " + strTitle + "</b>", contentHTML:strHTML}));
> >> >            });
>
> >> > map.addOverlay(mylocalmarker);
>
> >> > --
> >> > 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]<google-maps-api-for-flash%[email protected]>
>
> <google-maps-api-for-flash%[email protected]<google-maps-api-for-flash%[email protected]>
>
> >> .> For more options, visit this group at
>
> >>http://groups.google.com/group/google-maps-api-for-flash?hl=en.
>
> > --
> > 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]<google-maps-api-for-flash%[email protected]>
> .> For more options, visit this group at
>
> http://groups.google.com/group/google-maps-api-for-flash?hl=en.
>
>
>
>

-- 
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.

Reply via email to