On Sep 23, 11:39 am, David <[EMAIL PROTECTED]> wrote: > I have tried and tried to get my pretty custom marker onto a direction > map > No matter which method I use it stops the map from completing the > load. > > I have read the associated posts and used the ideas taken from them > but just can't seems to take that final step to actual get the markers > on the map and the map to stay there. > > http://kellytrucks.web.aplus.net/dd/directions.php > > The custom polyline was a piece of cake comparted to this :) > > I think I need a fresh set of eyes... > Any ideas ?
You have 2 problems: 1. this: var toMarker = new GMarker( originalToLatLng.lat(), originalToLatLng.lng() , markerOptions1 ); should be: var toMarker = new GMarker(originalToLatLng, markerOptions1 ); (the GMarker constructor takes a GLatLng as its first argument) 2. your map is not initialized before you attempt to add markers to it. The simplest way is to add a call to map.setCenter when you first create the GMap2 object. (map.setCenter(new GLatLng(0,0)); will work, but you might be able to do better). -- Larry --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
