You have it right for your var latlng, specify the var point the same way: var point = new google.maps.LatLng(<?php echo $csv_lat;?>, <?php echo $csv_long; ?>);
Also, you're using "map.addOverlay(new GMarker(point)); " which is now how v3 does it. Check this for a sample: http://code.google.com/apis/maps/documentation/v3/examples/marker-simple.html On Nov 22, 11:57 pm, Steve McIntyre <[email protected]> wrote: > Hi Ben, > > Thanks for the quick reply. That tutorial is one of the main ones I > followed. I think the only instance I have of the v2 coding are the > lines: > > var point = new GLatLng(<?php echo $csv_lat;?>, <?php echo > $csv_long; ?>); > map.addOverlay(new GMarker(point)); > > That tutorial doesn't full cover the marker overlays from what I can > tell, but maybe I need to read it a few more times. > > Here's the full javascript in the head > > <script type="text/javascript"> > function initialize() { > var latlng = new google.maps.LatLng(<?php echo $csv_lat;?>,<?php > echo $csv_long; ?>); > var myOptions = { > zoom: 13, > center: latlng, > mapTypeId: google.maps.MapTypeId.ROADMAP > }; > var map = new google.maps.Map(document.getElementById > ("map_canvas"), myOptions); > var point = new GLatLng(<?php echo $csv_lat;?>, <?php echo > $csv_long; ?>); > map.addOverlay(new GMarker(point)); > } > > </script> > > On Nov 22, 11:39 pm, Ben Appleton <[email protected]> wrote: > > > Hi Steve, > > > Your site is using Maps API v2 code (such as "GLatLng"), which is not > > compatible with Maps API v3. I suggest starting with the v3 > > tutorial:http://code.google.com/apis/maps/documentation/v3/introduction.html > > > Hope that helps, > > Ben > > <http://code.google.com/apis/maps/documentation/v3/introduction.html> > > On Mon, Nov 23, 2009 at 1:03 PM, Steve McIntyre > > <[email protected]>wrote: > > > > I know this should be easy, but I'm having trouble getting a marker to > > > show up on my map. I'm using a little PHP to convert an address to Lat/ > > > Long before things get started and that seems to be working fine. The > > > map is coming up with the correct location centered. I still need the > > > marker and the info box (marker at least) to show up. > > > > Here is the live example: > > > >http://hungryvt.com/public/test/map7.php > > > > I had V2 running on my website, but they recently quit working. I > > > thought it was bacause I added a .js to track external clicks and > > > downloads (What I call the Clifton Code), but I tried commenting that > > > out and it was still broken (All maps come up Palo Alto with a > > > geocoding error). > > > >http://hungryvt.com/southern/pop_up/vt_details_southern.php?recordID=246 > > > > I wonder if this has anything to do with the Oct 31st depreciation > > > note I read here.... > > > > Any help as appreciated. > > > > PS. If you'd like to see the PHP, please let me know. > > > > -- > > > > 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]<google-maps-js-api-v3%[email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-maps-js-api-v3?hl=. -- 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=.
