Javascript debug problem

Discussion created by sailitang on Sep 18, 2013
Latest reply on Sep 19, 2013 by JUihlein-esristaff

I am using ArcGIS api for javascript. I have a javascript function

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

                       function DisplayMap(strPoints, strfirestat) {

                           var map;
                           var i;
                           //var regions;

                                    "esri/map", "esri/geometry/Point", "esri/symbols/SimpleMarkerSymbol", "esri/graphic", "esri/tasks/GeometryService", "esri/graphicsUtils", "dojo/domReady!"
                            ], function (
                                    Map, Point, SimpleMarkerSymbol, Graphic, GeometryService, graphicsUtils


My code is:
jvscript = "DisplayMap('" & str & "', '" & firestr & "');"
Page.ClientScript.RegisterStartupScript(Me.GetType, "TimeOutMessage", jvscript, True)

Once I add "esri/graphicsUtils" and graphicsUtils, I always get the error message:"JavaScript runtime error: 'DisplayMap' is undefined". But if I delete them, the code works. Do you have any idea about it? I need graphicsUtils to get selected polygon???s center: var center = graphicsUtils.graphicsExtent(selection).getCenter(); Could you tell me what the problem of my above code is? Thanks.