$('#stationQuery').bind('click', function(){
    var drawStyle = $.extend( { },  map.geomap( "option", "drawStyle" ));
    var graphicLayer = $("#graphicLayer");
    var len = 10000;
    var maxX = 107.91953;
    var minX = 106.74598;
    var maxY = 30.168522;
    var minY = 29.14773;
    for(var i=0; i<len; i++)
    {
        var lgtd = Math.random()*(maxX - minX) + minX;
        var lttd = Math.random()*(maxY - minY) + minY;
        //var projectedCoords = $.geo.proj.fromGeodetic( [lgtd, lttd] );
        var projectedCoords = GLtoXY(lgtd, lttd)
        var geo = { "type": "Point", "coordinates": projectedCoords}    
        graphicLayer.geomap( "append", geo, drawStyle, false );
        
    }
    graphicLayer.geomap( "refresh", true );
    /*
    var featureCollection = {'type':'FeatureCollection', 'features':[]};
    var features = featureCollection.features;
    for(var i=0; i<len; i++)
    {
        var lgtd = Math.random()*(maxX - minX) + minX;
        var lttd = Math.random()*(maxY - minY) + minY;
        var projectedCoords = GLtoXY(lgtd, lttd)
        var feature = { "type": "Feature",
          "geometry": {"type": "Point", "coordinates": projectedCoords},
          "properties": {"prop": i}
          };
        features.push(feature);
    }
    var geo = { "type": "Point", "coordinates": projectedCoords}    
    graphicLayer.geomap( "append", featureCollection, drawStyle );
    */
});

相关文章:

  • 2021-11-05
  • 2021-04-12
  • 2022-01-16
  • 2021-11-08
  • 2021-05-15
  • 2021-10-18
  • 2022-03-05
猜你喜欢
  • 2022-12-23
  • 2021-07-08
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案