Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7976129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:50:28+00:00 2026-06-04T08:50:28+00:00

My WPF application uses the Flash API for google map. Everything works fine except

  • 0

My WPF application uses the Flash API for google map. Everything works fine except that I need to show some custom details when the user clicks the balloons.

The actionscript code is below:

var map:Map = new Map(); 
map.key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; 
map.sensor = "true"; 
var marker : Marker; 
map.setSize(new Point(stage.stageWidth, stage.stageHeight)); 
map.addEventListener(MapEvent.MAP_READY, onMapReady); 
this.addChild(map);  

var CustN:String;

function onMapReady(event:Event):void 
{   
    var centerLL : LatLng = new LatLng(38.05,-77.036562); 
    map.setCenter( centerLL, 10, MapType.NORMAL_MAP_TYPE); 
    map.addControl(new ZoomControl());
    map.addControl(new PositionControl()); 
    map.addControl(new MapTypeControl());   
    marker = new Marker( centerLL );  
    map.addOverlay( marker );   
    ExternalInterface.addCallback("Search",onSearch); 
}

function onSearch(lat:Number, lon:Number, CustName:String ):void 
{
    CustN  = CustName; 
    var centerLL : LatLng = new LatLng(lat,lon); 
    map.setCenter(centerLL, 10, MapType.NORMAL_MAP_TYPE);   
    marker = new Marker( centerLL );  
    marker.addEventListener(MapMouseEvent.CLICK, onMapClick); 
    map.addOverlay( marker ); 
}

function onMapClick(event:MapMouseEvent):void 
{  
    map.openInfoWindow(event.latLng, new InfoWindowOptions({title: "Click Event", content: CustN})); 
}

I call the onSearch function from my C# code as below:

 foreach (var rec in LstCoOrdinates)
        {
            XElement call = new XElement("invoke", new XAttribute("name", "Search"), new XAttribute("returntype", "xml"), new XElement("arguments", new XElement("number", rec.latitude)),
                new XElement("arguments", new XElement("number", rec.longitude)), new XElement("arguments", new XElement("string", rec.name)));
            axFlash.CallFunction(call.ToString(SaveOptions.DisableFormatting));
        }

I need to display the name corresponding to the balloon clicked

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:50:29+00:00Added an answer on June 4, 2026 at 8:50 am

    you can specify DisplayObject .icon property in your g Marker. and change it’s visibility on click.
    Predefine label or set it on click whatever you need.

    marker = new Marker( centerLL );  
    marker.icon = new LabelSprite();
    marker.icon.visible = false;
    marker.addEventListener(MapMouseEvent.CLICK, onMapClick); 
    map.addOverlay( marker );
    
    function onMapClick( e:Event ):void
    {
      if(selectedMarker) 
         selectedMarker.icon.visible = false;
    
      selectedMarker = e.currentTarget as Marker;
      selectedMarker.icon.visible = true;
    }
    
    
    public class LabelSprite extends Sprite
    {
      private var labelTextField:TextField;
    
      public function LabelSprite()
      {
        labelTextField = new TextField();
        addChild(labelTextField);
      }
    
      public function set labelText(value:String):void
      {
        labelTextField.text = value;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF application which uses a JumpList (Recent only). Everything works perfectly
I am starting on creating a WPF application that uses the Datagrid. I need
I have a simple WPF application that uses ClickOnce to handle installing. Within this
I'm writing a WPF application that uses a component, and this component returns a
We are developing a WPF application which uses Telerik's suite of controls and everything
I'm recently working on a WPF application that uses the datagrid from the WPF
I have an application that uses WPF Composite, and I have an issue. I've
I have a fairly large application that uses WPF for its user interface. I
I'm writing a WPF application that uses one document at a time. Is there
I am designing a WPF application that uses a DLL with maybe 40 public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.