On Feb 16, 7:39 am, "[email protected]" <[email protected]>
wrote:
> On Feb 16, 7:29 am, Rick Donohoe <[email protected]> wrote:
> > Hey guys,
>
> > Page in question:www.my-walk.com/addwalk.php
>
> > Im using the following code to put my markers into a string so they can be
> > easily stored in a databse:
>
> >  for (i = 0; (i < markersArray.length); i++)
> >       {
> >         markerString += markersArray[i].getPosition().toString() + "," ;
> >       }
>
> > With this code I usually get the following example of String:
>
> > (54.65495130292765, -3.354217564526365),(54.66627060518853,
> > -3.3509559983642556),(54.659121939101354,
> > -3.331043278637693),(54.65495130292765,
> > -3.341686284008787),(54.65922123474505,
> > -3.3641739243896462),(54.66279571629887, -3.3578224534423806),
>
> > Once I pull this String back out of MySql, how do I go about converting it
> > back to Markers?
>
> How do you add your markers to start with?
>
>  addMarker(event.latLng);
>
> event.latLng is a google.maps.LatLng object, you need to change your
> string (which is a sequence of latitude and longitude values as
> strings) into pairs of numbers (latitude and longitude) and pass those
> into the google.maps.LatLng 
> constructor.http://code.google.com/apis/maps/documentation/javascript/reference.h...
>
> Then use those resulting google.maps.LatLng objects as the argument to
> call addMarker.

Another option would be to return them from your database a json or
xml (or even kml), and then process that to recreate the markers.
That would be the way I would do it.

 -- Larry

>
>
>
>
> > Also, I have found that every so often the Google Map won't display on my
> > page, instead it is just a grey area where the map should be. To fix this I
> > have to close Firefox and Reload all the open tabs.
>
> > Can anyone tell me why this is?
>
> > I Appreciate any help guys,
>
> > Rick- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to