• CommentAuthorMattR
    • CommentTimeMay 12th 2014
    I am adding around 2000 markers to the map but it is very slow around 20 seconds. I have tried using the preloadImages function but that makes no difference.

    I am adding markers to an array of objects and using this code to draw them

    this.icon = new Telogis.GeoBase.MapLayers.ImageObject({
    anchorPoint: new Point(0.5, 0.5),
    dragEnabled: false,
    layer: layer,
    location: new LatLon(lat, lon),
    src: this.iconImgUrl

    is there a better way of adding a large number of markers?
    Hi MattR,

    Have you looked into our XSLTObjectLayer class?

    It is designed to contain a large number of objects that are read from an XML file and displayed. It uses XSLT for handling object clipping to the viewport, which loads more quickly than the RTree used in MapLayers.ObjectLayer at the cost of flexibility.

    You could find an example of the XSLTObjectLayer in your GeoStream\server\scripts folder. The example consists of three files:

    To test the tutorial page, hit the following URL in a browser:

    Any further questions, please feel free to drop us a line at gbsupport@telogis.com.