AnsweredAssumed Answered

Full extent  -zoom to Graphic Layer

Question asked by meenu.monu on Sep 20, 2015
Latest reply on Sep 23, 2015 by rscheitlin

After adding graphics trying to zoom map using the code below. But it is giving script error.How to zoom map with all graphics visibility?

    <script type="text/javascript" src="">


           var geomPoint = new esri.geometry.Point(list.d[recordcount].ELon, list.d[recordcount].ELat, new esri.SpatialReference({ wkid: 2278 }));

                            geomPoint = esri.geometry.geographicToWebMercator(geomPoint);

                            var symbol = new esri.symbol.PictureMarkerSymbol({

                                "url": colourstyle,

                                "height": 16,

                                "width": 16,

                                "type": "esriPMS"



                            var infoTemplate = new esri.InfoTemplate();

                            infoTemplate.content = strhotspot;

                            var pointGraphic = new esri.Graphic(geomPoint, symbol);





//Getting Extent


//var zoomExtent = esri.graphicsExtent(;


       var lyrExtent = esri.geometry.geographicToWebMercator(esri.graphicsExtent(;