|
Further to the above, forgot to mention that I can have any number of moving points and would like the map to keep them all in view. When the map loads I call the javascript maploaded as per a previous forum entry,
<Simplovation:Map runat="server" ID="Map1" OnClientMapLoaded="mapLoaded" /> <script type="text/javascript"> // This method is run once the map has completed loading on the page function mapLoaded() { var map = $find("<%=Map1.ClientID%>"); //This code will center the map on all the shapes that are plotted var locations = new Array(); for(var a = 0; a < map.get_Map().GetShapeLayerCount(); a++) { for(var b = 0; b < map.get_Map().GetShapeLayerByIndex(a).GetShapeCount(); b++) { Array.addRange(locations, map.get_Map().GetShapeLayerByIndex(a).GetShapeByIndex(b).GetPoints()); } } if (locations.length != 0) map.get_Map().SetMapView(locations); } </script>
but it doesn't appear to fire after timer fires the updatemap() sub
|