Select to view content in your preferred language

Unable to show Mulipoint greater than 40 using arcgis javascript API-3.5.

825
3
Jump to solution
06-04-2013 04:58 AM
devdevelop
Emerging Contributor
hi all,
i am having array of mulipoints with length greater than 37, if its below 37 we are able to show the points on map using arcgis javascript API-3.5.
If its above 37 we unable to display i.e none of the points showing.Please provide some help regarding this.
0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Notable Contributor
Have you tested your points using the sample code in the fiddle? If your locations are in web mercator you'll just need to update the array of points to specify the new values and then update the wkid.

View solution in original post

0 Kudos
3 Replies
KellyHutchins
Esri Notable Contributor
I can successfully display more than 40 locations as part of a multipoint feature. Here's a fiddle showing this:

http://jsfiddle.net/Njy46/


Can you provide more details or sample code that will help us reproduce the issue.
0 Kudos
devdevelop
Emerging Contributor
here is the code ::
here plz add more than 40 points,

<!DOCTYPE html>
<html>
<head>
  <title>Create a Map</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
  <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css">
  <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">
  <style>
    html, body, #mapDiv {
      padding: 0;
      margin: 0;
      height: 100%;
    }
  </style>
 
  <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script>
  <script>
    dojo.require("esri.map");
 
    /*dojo.connect(map, "onClick", addPoint);
   function addPoint(evt) {
      map.infoWindow.setTitle("Coordinates");
      map.infoWindow.setContent("lat/lon : " + evt.mapPoint.y + ", " + evt.mapPoint.x);
      map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint));
   }*/
 
    function init() {
    map = new esri.Map("mapDiv", {
        basemap: "streets",
        center: [-75.67, 39.69],
        zoom: 7
    });
     map.setExtent(new esri.geometry.Extent(-144.13584773952124, 7.981485927970198, -52.76454682003924, 68.8956865409582, new esri.SpatialReference({ wkid: 4326 })));
    geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
    var point = new esri.geometry.Point(-13131460.425434, 4011128.09171248, new esri.SpatialReference({ wkid: 102113 }));
    var outSR = new esri.SpatialReference({ wkid: 4326 });
   
    var pts = [
        [-13601089.5272182, 6037133.90669126],
        [-13620657.4064592,4517408.74867887],
        [-13131460.425434, 4011128.09171248],
        [-13698928.9234232,6332241.95908267]
    ];
    var mp = new esri.geometry.Multipoint(new esri.SpatialReference({wkid:102113}));
    mp.points = pts;
    var PrjParams = new esri.tasks.ProjectParameters();
    PrjParams.geometries = [mp];
    PrjParams.outSR = outSR;
    PrjParams.transformation = {
        wkid: parseInt(4326)
    }
    var symbol = esri.symbol.PictureMarkerSymbol('http://www.appointmentpoint.com/resource/images/location.png', 20, 20);
     //console.log(symbol);
  geometryService.project(PrjParams, function (outputpoint) {
      
        //mp = new esri.geometry.Multipoint(new esri.SpatialReference({wkid:4326}));
        mp.points = outputpoint[0].points;
        mp = esri.geometry.geographicToWebMercator(mp); 
        var graphic = new esri.Graphic(mp, symbol);
       var layer = new esri.layers.GraphicsLayer();
  layer.add(graphic);
       map.addLayer(layer);
  dojo.connect(layer,'onClick',layer,function(evt)
  {
   var g = this.graphics[0];
   var symbolchange = esri.symbol.PictureMarkerSymbol('http://www.appointmentpoint.com/resource/images/location.png', 50, 50);
        g.setSymbol(symbolchange);
  });
  //map.on("click",symbolchange);
  //var graphic = new esri.Graphic(point, symbol);
  //var layer = new esri.layers.GraphicsLayer();
  //layer.add(graphic);
  //map.addLayer(layer);
 
 
 
    }); 
}

    dojo.ready(init);
  </script>

</head>
<body class="claro">
  <div id="mapDiv"></div>
</body>
</html>
0 Kudos
KellyHutchins
Esri Notable Contributor
Have you tested your points using the sample code in the fiddle? If your locations are in web mercator you'll just need to update the array of points to specify the new values and then update the wkid.
0 Kudos