This appears to be a clash with jqtouch css.  If I comment out the
jqtouch css file, the icon shows up.

<link type="text/css" rel="stylesheet" media="screen"
href="jqtouch/jqtouch/jqtouch.css" />

On Wed, Apr 7, 2010 at 2:15 PM, davis <[email protected]> wrote:
> Hi,
>
> I create a new marker like this:
>
>        marker = new google.maps.Marker( {
>                position : latlng,
>                map : map,
>                icon: 'http://google-maps-icons.googlecode.com/files/car.png'
>        });
>
> In FireBug, I see the HTTP GET for the car.png, and it is returned, so
> the url is valid.
>
> When I load my map, the marker does not appear.  If I remove the icon
> property:
>
>        marker = new google.maps.Marker( {
>                position : latlng,
>                map : map
>        });
>
> The default red marker shows up.
>
> I init the map like this:
>
> <script src="http://maps.google.com/maps/api/js?sensor=false";></
> script>
>
> <div id="map_canvas" style="position: absolute; width: 100%; height:
> 100%;'"></div>
>
> // the google maps object
> var map;
>
> // marker for our current location
> var marker;
>
> var defLat = 25.772687243658137;
> var defLon = -80.20843505859375;
>
> function load() {
>        var latlng = new google.maps.LatLng(defLat, defLon);
>        var myOptions = {
>                zoom : 8,
>                center : latlng,
>                mapTypeId : google.maps.MapTypeId.ROADMAP
>        };
>        map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>
>        addCurrentLocation(latlng);
> }
>
> function addCurrentLocation(latlng) {
>        marker = new google.maps.Marker( {
>                position : latlng,
>                map : map,
>                icon: 'http://google-maps-icons.googlecode.com/files/car.png'
>        });
> }
>
> Any clue what I am doing wrong here?  I also breakpoint the marker
> constructor, and I can see the icon property is set to the url.
>



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-- 
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