Question

I have a list of Northing and Easting points

MapNorth    MapEast
439624  504743
439622  504736
439722  504775
439738  504739
439715  504774
439734  504739
439711  504773
439728  504739
439705  504773
439724  504739
439699  504773
439718  504743
439694  504773
439713  504743
439688  504776
439708  504742
439680  504773
439703  504743
439674  504774
439698  504742
439668  504773
439693  504743
439663  504773
439688  504740

I am using Esri ArcMap JavaScript API. I would like to work out how to zoom to an area of the map that will display all of these points. I am not sure where to start. Would anyone be able to point me into the right direction.

Thanks

Was it helpful?

Solution 2

Thanks Lars. Simple when u know how!!

  function updateExtent(){

    var myMultiPoint = {"geometry":{"points":[[123456,976543],[445355,345345], [3425424,234234]],"spatialReference":7700},"symbol":{"color":[255,255,255,64],
    "size":12,"angle":0,"xoffset":0,"yoffset":0,"type":"esriSMS","style":"esriSMSCircle", "outline":{"color":[0,0,0,255],"width":1,"type":"esriSLS","style":"esriSLSSolid"}}};

    myMap.graphics.add(new esri.Graphic(myMultiPoint));

    myMap.setExtent(esri.graphicsExtent(myMap.graphics.graphics)); 

}

OTHER TIPS

Put Them all in a Graphics layer and set The map extent to The graphics layers extent, or zoom to The layers extent.

you may also have to reproject Your Points, namespace esri.geometry have what you need here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top