[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-26 Thread xelawho
> Here it is. > > http://hungryvt.com/map_tests/google-php/big_combo.php firebug no show error. javascript happy! -- 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 google-maps-js-api-v3@google

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-26 Thread Steve McIntyre
Success! Thank you all for your help and forcing me to find the solution on my own, especially xelawho. I've put the whole thing into an external JS file. There's still more work to be done, but this was the big stumbling block I'd been banging my head against for the last couple of weeks. Here i

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-26 Thread geocode...@gmail.com
On Oct 26, 8:36 am, Steve McIntyre wrote: > Again, I'll askcan it be done in two separate functions? Yes. You can do it in as many functions as you want. Both functions will need to have access to the "map". -- Larry > > On Oct 26, 4:16 am, Rossko wrote: > > > > > > > > > > Both could

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-26 Thread Rossko
Yes. -- 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 google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com.

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-26 Thread Steve McIntyre
Again, I'll askcan it be done in two separate functions? On Oct 26, 4:16 am, Rossko wrote: > > Both could be executed with the window.onload command, rather than the > > body tag. > > Why 'both'?  You don't need everything to happen at once.  There is > absolutely nothing stopping you havin

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-26 Thread Rossko
> Both could be executed with the window.onload command, rather than the > body tag. Why 'both'? You don't need everything to happen at once. There is absolutely nothing stopping you having code that geolocates, plots a map, requests some XML, plots some XML, etc in sequence. -- You received t

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-25 Thread Steve McIntyre
So... Yes, it can be done in two separate functions? Both could be executed with the window.onload command, rather than the body tag. On Oct 25, 11:30 pm, "jufemaiz:joel" wrote: > Yes - you just need to be referencing the same "map" (I'm assuming "map > making" is the akin to creating the map it

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-25 Thread jufemaiz:joel
Yes - you just need to be referencing the same "map" (I'm assuming "map making" is the akin to creating the map itself, whereas adding/removing points is a secondary action). -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-25 Thread Steve McIntyre
Is it possible to leave the map making and geolocation to one function, and just add markers to the one map with a separate function? or Does the map drawing and marker placement all have to be done in one function? On Oct 25, 1:02 pm, Rossko wrote: > > It looks > > like there are two maps be

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-25 Thread Rossko
> It looks > like there are two maps being drawn and the DB map is blocking out the > geolocation map. Yep, that's exactly it, it does what you tell it to do. >     function load() { >       var map = new google.maps.Map(document.getElementById("map"), { Makes a map in the with id map. >      

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-25 Thread Steve McIntyre
Javascript Smash! Javascript, meet Hulk. Hulk, meet Javascript. OK, so here's one I ran through Firebug that isn't showing me any errors. It attempts to combine the geolocation with the DB listings, though still keeping the code separate for the two functions. It looks like there are two maps bein

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-22 Thread xelawho
> I was able to get it so the functions load (as seen with the alert on > Listings), but it's still not populating the map_canvas. > I suspect this line might be a key to overcoming this: > bindInfoWindow(marker, map, infoWindow, html); I don't think your alert actually shows anything, as it just

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-22 Thread xelawho
> I was able to get it so the functions load (as seen with the alert on > Listings), but it's still not populating the map_canvas. > > I suspect this line might be a key to overcoming this: > bindInfoWindow(marker, map, infoWindow, html); I don't think your laert actually shows anything, as it jus

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-21 Thread Steve McIntyre
So I took your advice and I put the geolocation and the DB listings in separate functions (tasks). I was able to get it so the functions load (as seen with the alert on Listings), but it's still not populating the map_canvas. I suspect this line might be a key to overcoming this: bindInfoWindow(m

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-21 Thread Rossko
> earlier quote - "I'm guessing that it should go on the main page > instead of being > placed within the XML output of the business listings, since that's > server side info, and user location is client side." Yes, that would make sense, as javascript placed in a file being treated as XML data is

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-21 Thread Steve McIntyre
> It may be that you haven't grasped how php works?  ALL the php is run > at server, any output is assembled into a page which is sent to the > client, THEN the client builds the display and runs any javascript. Yes I do understand that PHP is server side and JS is client side and that AJAX can ma

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-21 Thread Rossko
> Agreed, and it seems like it's a waste of time to try to mix PHP into > that function. It may be that you haven't grasped how php works? ALL the php is run at server, any output is assembled into a page which is sent to the client, THEN the client builds the display and runs any javascript. >

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-20 Thread Steve McIntyre
> Whatever geolocation code you put in before that, your php writes in > the centre values here effectively hardcoded.  Have you used your > browser's 'view source' feature to see what actually gets sent to the > browser by your php? I forgot to mention those. I put those in there in a side expe

[Google Maps API v3] Re: Combine User Location with PHP/MySQL Listings

2011-10-20 Thread Rossko
>           var map = new google.maps.Map(document.getElementById("map"), { >         center: new google.maps.LatLng( $row_result_loc['loc_lat'];?>, ), Whatever geolocation code you put in before that, your php writes in the centre values here effectively hardcoded. Have you used your browser's '