hi Jug
I'm facing a closed path for developing my application...maybe i
didn't explain enough about my problem
I have Flex Generated PHP files...and XML code will be like this
<response>
- <data>
- <row>
<id>1</id>
<name>Ahmad</name>
<address>The Palm - Dubai</address>
<lat>25.006906</lat>
<lng>-54.987859</lng>
......
and i have home locator example in google map API
http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/StoreLocatorDemo/StoreLocatorDemo.html
its about XML Schema that you mention it, the problem that i can't
make the right modification of the xml to be code friendly to flex xml
way
var bounds:LatLngBounds = new LatLngBounds();
for (var i:Number = 0; i < markersCount; i++) {
var markerXml:XML = markers[i];
var name:String = markerx...@name;
var address:String = markerx...@address;
var distance:Number = new Number(markerx...@distance);
var latlng:LatLng = new LatLng(markerx...@lat,
markerx...@lng);
var storeInfo:String = "<b>" + name + "</b>\n<br/>" +
address;
var marker:Marker = createMarker(latlng, name,
storeInfo);
storeLocations.addItem({StoreInfo: storeInfo, Distance:
distance.toFixed(2), Marker: marker});
bounds.extend(latlng);
map.addOverlay(marker);
the output of xml will be like this
<markers>
<marker name="Pan Africa Market" address="1521 1st Ave, Seattle, WA"
lat="47.608940" lng="-122.340141" type="restaurant"/>
my goal is to recode xml translation into flex xml way...
{
var dsRowIndex:int = e.rowIndex;
var dsFieldName:String = e.dataField;
var dsColumnIndex:Number = e.columnIndex;
var vo:* = dataArr[dsRowIndex];
var col:DataGridColumn = dataGrid.columns[dsColumnIndex];
var newvalue:String = dataGrid.itemEditorInstance
[col.editorDataField];
trace("a:" + dsRowIndex + ", " + dsFieldName + ", " +
dsColumnIndex);
var parameters:* =
{
"id": vo.idCol, "name": vo.nameCol, "address":
vo.addressCol, "lat": vo.latCol, "lng": vo.lngCol }
and become like this...
<marker>
<Name>Fname</Name>
<address>2211</address>
...
</marker>
or modifiing the home store xml ( var bounds:LatLngBoun)... to be
readable with flex xml generator
sound hard for normal developer like me...anyway i just try to explain
my point to you.
thanks for your replay Juguang.
kicko
On Jul 14, 7:27 pm, Juguang XIAO <[email protected]> wrote:
> Sorry sir. I do not quite get your question. Can you put it in another way
> around?
>
> You can choose not to use the XML format described in this tutorial. It is
> not a standard XML schema. You can use your own XML schema for your business
> purpose. If I may, I would suggest you to take KML format. But that may take
> you a while to learn for format. If you want to use KML, there is kmlparser
> inhttp://code.google.com/p/gmaps-utility-library-flash/
>
> Let us know if you need any help.
>
> Juguang
>
> On Mon, Jul 13, 2009 at 7:29 AM, Ahmad AlSakka <[email protected]>wrote:
>
>
>
>
>
> > Hi all
>
> > I'm using Google Maps API through adobe flex, I checked the tutorial
> > that generates XML Using PHP/MySQL"http://code.google.com/apis/maps/
> > articles/phpsqlflex.html",which by the way I want to Thank Pamela Fox
> > for the tutorials and for the codes.
>
> > adobe flex is able to generate XML code through PHP, it gives me
> > to ,search, insert,update,edit, delete, and my database is depending
> > on it, and Flex XML formulas is different than the tutorial, "i have
> > the same table like in the tutorial"
> > in flex when generate XML file, it display like this
>
> > --------------------------------------------------------------------------------------------
> > - <response>
> > - <data>
> > - <row>
> > <id>1</id>
> > <name>Ahmad</name>
> > <address>The Palm - Dubai</address>
> > <lat>25.006906</lat>
> > <lng>-54.987859</lng>
> > </row>
> > </data>
> > - <metadata>
> > <totalRows>1</totalRows>
> > <pageNum>0</pageNum>
> > </metadata>
> > </response>
>
> > --------------------------------------------------------------------------------------------
> > and in the tutorial..it looks like this....
>
> > --------------------------------------------------------------------------------------------
> > <markers>
> > <marker name="Pan Africa Market" address="1521 1st Ave, Seattle, WA"
> > lat="47.608940" lng="-122.340141" type="restaurant"/>
> > <marker name="Buddha Thai & Bar" address="2222 2nd Ave, Seattle, WA"
> > lat="47.613590" lng="-122.344391" type="bar"/>
> > <marker name="The Melting Pot" address="14 Mercer St, Seattle, WA"
> > lat="47.624561" lng="-122.356445" type="restaurant"/>
> > <marker name="Ipanema Grill" address="1225 1st Ave, Seattle, WA"
> > lat="47.606365" lng="-122.337654" type="restaurant"/>
> > <marker name="Sake House" address="2230 1st Ave, Seattle, WA"
> > lat="47.612823" lng="-122.345673" type="bar"/>
>
> > --------------------------------------------------------------------------------------------
> > all what i want is search for address, display it on datagrid and
> > finally appers to Google map in flex with XML generator.
> > i tried and tiered to modify the xml marker code and put it on flex
> > xml code...is there way to solve it out!
> > thanks for your time and sorry for any waste of your time that I've
> > caused.
>
> > regards;
>
> > Ahmad
>
> --
> =============
> Juguang XIAO
> Beijing, China
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---