flex - Dynamic Google Maps API InfoWindow HTML Content -


I am working in Flash Builder 4 with Google Maps Action Script API. I have created a map, loaded some custom markers on it and added some mark up to each marker audience.

When I load an InfoWindow panel, then the problem is that I want to dynamically set html content based on the information stored in a database. The problem is that this information can change in every two seconds, and every marker has a unique data set, so I can not really set it when creating a marker. I have a way that will load all records from my database in every minute or so many object variables. The basic foundation in the problem is that there is no way to identify a specific info window for me. , So I can not determine what information to draw in the panel.

  marker.addEventListener (MapMouseEvent.ROLL_OVER, function (e: MapMouseEvent): zero {showInfoWindow (e.latLng)}, incorrect, 0, wrong);  

This is my mouse event listener. The function I call, "showInfowindow" looks like this:

  private function showInfoWindow (latlng: LatLng) : Zero {var Option: InfoWindowOptions = New InfoWindowOptions ({title: appData [* I need A unique ID here !!! *]. Type + "Summary", Content HTML: AppData [* I need a unique ID !! ! *]. Info}); This.map.openInfoWindow (latlng, option); }  

I thought I was on something by being able to cross a variable in my event listener's announcement, but it only hates passing through dynamic variables , It only uses the final value.

example:

  marker.addEventListener (MapMouseEvent.ROLL_OVER, function (e: MapMouseEvent): zero {showInfoWindow (e.latLng, record.unit_id)}, incorrect, 0, wrong);  

This solution is close to the pain to work. When I try the solution given above and roll over a marker, I get the information, but the information of each marker reflects the information made by the last marker.

I apologize for explaining for a long time but I just wanted to clarify my question as much as possible.

Thanks in advance,

Peter Hannoman

I have time Very unpleasant solution is created for ..

Longitude of the marker after each & amp; Latitude is unique. I add a bit of code where the markers add to the map, which globally creates a visible associative array, which is the value of the Google Maps API's location object and the form of my unique identifier Uses. Then later when the listener removed my event, then I can remove the place item from the returned incident, I am doing a lookup in my hand and can drag unique ID to pull the specific information of the Maukar in Infundo.

This works great, but it looks dirty to me. Please tell me if anyone has a better solution?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -