HI:

CAN any body help me. I am using a tracking devices storing data in MY
data base.then I get my data using C# and calling a javascript
function to show my cars on googlemap .take a look on my javascript
code I think there is a syntax error.I cannot see my markers.


var map = null;
var latlngArray = null;
var ThisCarDeviceId = null;
var AutoScaleFlagBool = null;
function load(y, x, speed, deviceid, direction, carnumber,
AutoScaleBool) {
    if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(x, y), 17);
        map.setMapType(G_HYBRID_MAP);

        map.addControl(new GSmallMapControl());
        map.addControl(new GScaleControl());
        map.addControl(new GMapTypeControl());
        map.addControl(new GOverviewMapControl());

        var ppgicon = new new GIcon(G_DEFAULT_ICON);

        if (22.5 < direction && direction < 67.5) {
            strimg = 'img/car_45.png';
        }
        else if (67.5 < direction && direction < 112.5) {
            strimg = 'img/car_90.png';
        }
        else if (112.5 < direction && direction < 157.5) {
            strimg = 'img/car_135.png';
        }
        else if (157.5 < direction && direction < 202.5) {
            strimg = 'img/car_180.png';
        }
        else if (202.5 < direction && direction < 247.5) {
            strimg = 'img/car_225.png';
        }
        else if (247.5 < direction && direction < 292.5) {
            strimg = 'img/car_270.png';
        }
        else if (292.5 < direction && direction < 337.5) {
            strimg = 'img/car_315.png';
        }
        else {
            strimg = 'img/car_0.png';
        }

        ppgicon.src = strimg;
        ppgicon.iconSize = new GSize(24, 24);
        ppgicon.iconAnchor = new GPoint(12, 12);
        ppgicon.infoWindowAnchor = new GPoint(0, 24);
        ppgicon.transparent = null;
        ppgicon.imageMap = null;

        var latlng = new GLatLng(y, x);
        if (!isDefined(latlngArray)) {
            latlngArray = new Array();
        }

        latlngArray.push(latlng);




        if (isDefined(ThisCarDeviceId))
            if (ThisCarDeviceId == deviceid) {

           DESTINATION_MARKER = new GMarker(latlng, ppgicon);

        map.addOverlay(DESTINATION_MARKER);

    }
}


what is wrong in that code ..please help.


















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

Reply via email to