Hi Oscar-

When the user enters their location upon submitting a question, you
can save both the question and the latitude/longitude into the
database. Then, the administrator looking at the map can just see a
map of markers plotted with coordinates. That would be the best
strategy, as it'd be an efficient use of the geocoder, and a fast user
experience for everyone.

As for your second question, you can do the geocode, geocode callback,
and infowindow open all within the same function. Since variables have
function scope in AS3, the original address sent to the geocoder would
be available everywhere. Alternatively, I believe there's a
response.name property which holds the original query.

- pamela

On Tue, Dec 9, 2008 at 3:22 PM, Oscar Cortes <[email protected]> wrote:
>
>
> I have an application where users can submit questions by subject, and
> they enter manually their location ( I know it could be a drop-down of
> something, but it is the way it is currently designed).
> What I want to do is map those locations ( for example, 'san diego',
> 'Boston,Ma', 'Japan') on Google Maps and Flex.
>
> What my app should do is to offer the admin to click in different
> subjects and then get the list of questions submitted for that subject
> and then map the submitter location.
>
>  What I did was to use the geocoding and add markers (InfoWindow) to
> the map. But I have a couple of questions:
>
> 1. First I saw that it is not recommended to do a loop for geocoding.
> But since locations may vary by subject, it looks like my only option
> is to geocode locations everytime the admin selects a different
> object. It's actually performing fine, I guess the geocode cache is
> helping. My question is, would this use case justify to geocode in a
> loop? or is there any other solution that people recommend?
>
> 2. I want to provide a customized InfoWindow and it looks like I can
> use the customizedContent property. No problem there, but I want to
> use some of the data that came with the user's location. For example,
> my record has user's id, location and an URL that shows a list of
> questions submitted by the user. However, since I am using geocoding
> and listening for the geocode sucess event, I cannot figure it out how
> to get the matching data for a specific record.
>
> For example: I have "Ana, Boston,MA, http://someULR";
>
> I have access to event.response.placemarks in the ongecodesucess event
> which can give me the "address" - Boston, but not "Ana" or the URL.
>
> I want to use those values to add them to my customized InfoWindow by
> user
>
> How are people doing this with geocoding?
>
>
>
>
> >
>

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