Ok I can output XML from my database although I can't get the
Havershine formula to work. I have 3 problems:
- In the SELECT command in the blog they use '%s' in the formula. Is
that suppose to be the radius? I assume she got tired and didn't want
to write the word radius????
$query = sprintf("SELECT address, name, lat, lng, ( 3959 * acos( cos
( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) -
radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS
distance FROM markers HAVING distance < '%s' ORDER BY distance LIMIT
0 , 20",
- She has lat in her php escape clause twice, why is that? Its exactly
the same as one another. Is there somewhere in her formula that
specifies 2 different lats?
28. mysql_real_escape_string($center_lat),
29. mysql_real_escape_string($center_lng),
30. mysql_real_escape_string($center_lat),
- After I get the xml to work properly with the Havershine formula I
don't know how to get it with the Javascript... Any Ideas?
On Nov 19, 10:23 pm, Schwimms <[email protected]> wrote:
> Wow! I love it when you talk ~Dummy~ to me.
>
> That is exactly what I suspected I just wasn't sure, I appreciate that
> you explained that to me.
>
> So far I have broke out what I need it to do into steps now its just
> writing the code for those steps....
>
> 1. In vb I'm going to convert the searched address into geocode.
> 2. I'll define that geocode
> 3. Create a SQL datasource
> 4. Do the Query
> 5. Output the xml
> 6. Catch the xml in the javascript
> 7. Use the same javascript that is provided on the website you gave me
> to populate the map.
>
> On Nov 19, 4:29 am, Rossko <[email protected]> wrote:
>
> > > It looks like the code that I posted for the php was set up as its own
> > > page
>
> > I woudn't call it a 'page' as such, but it is an independant
> > serverside script yes.
> > Here's what it does in isolation.
> > "Something" calls it by using its URL wth some querystring parameters
> > attached.
> > The php script reads the parameters, and uses them as selectors to
> > search a database.
> > It outputs the results as XML dynamically.
> > To the calling "Something", it just looks as though the URL points to
> > an XML file.
> > You could view this script as an XML service provider, so far as the
> > rest of the net is concerned.
>
> > In the original application, the javascript takes user input and
> > builds a parameterised URL to call that remote script.
> > The javascript digests the XML it recieves in return and changes the
> > display (on the same page) accordingly.
>
> > How you do client-server interactions in ASP I have no idea.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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?hl=en.