@pirireis/webglobeplugins 0.6.48-a → 0.6.49-a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "0.6.48-a",
3
+ "version": "0.6.49-a",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT"
@@ -288,35 +288,33 @@ export default class RangeRingAngleText {
288
288
 
289
289
  }
290
290
 
291
- __realCoords(long, lat, radius, stepAngle, centerID, outBucket) {
291
+ __realCoords(longCenter, latCenter, radius, stepAngle, centerID, outBucket) {
292
+ const { globe } = this;
292
293
  const { coords, coordsZ, attribs } = outBucket;
293
- const coords_ = realCircle(this.globe, long, lat, radius, stepAngle);
294
- { // add 0
295
- const { long, lat } = coords_[0];
294
+ let i = 1;
295
+ for (let aci = stepAngle; aci < 360; aci += stepAngle) {
296
+ const { long, lat } = globe.Math.FindPointByPolar(longCenter, latCenter, radius, aci);
296
297
  coords.push(long, lat);
297
298
  coordsZ.push(0);
298
- const key = this._key(centerID, 0);
299
+ const key = this._key(centerID, i); i++;
299
300
  // fidkey is the key
300
301
  attribs.push({
301
302
  "__fid__": key,
302
- "aci": "K"
303
- });
303
+ "aci": (aci).toFixed(0).toString().padStart(3, '0')
304
+ })
304
305
  }
305
306
 
306
- let aci = stepAngle;
307
307
 
308
- for (let i = 1; i < coords_.length; i++) {
309
- if (aci >= 360) break;
310
- const { long, lat } = coords_[i];
308
+ { // add 0
309
+ const { long, lat } = globe.Math.FindPointByPolar(longCenter, latCenter, radius, 0);
311
310
  coords.push(long, lat);
312
311
  coordsZ.push(0);
313
- const key = this._key(centerID, i);
312
+ const key = this._key(centerID, 0);
314
313
  // fidkey is the key
315
314
  attribs.push({
316
315
  "__fid__": key,
317
- "aci": (360 - aci).toFixed(0).toString().padStart(3, '0')
318
- })
319
- aci += stepAngle;
316
+ "aci": "K"
317
+ });
320
318
  }
321
319
  }
322
320
 
@@ -371,12 +369,13 @@ export default class RangeRingAngleText {
371
369
 
372
370
 
373
371
  const realCircle = (globe, longitude, latitude, radius, stepAngle) => {
374
- const pointsLongLat = globe.Math.GetEllipseGeo(
372
+ const pointsLongLat = globe.Math.F(
375
373
  longitude,
376
374
  latitude,
377
375
  radius,
378
376
  radius,
379
377
  0,
380
378
  stepAngle);
379
+ console.log("pointsLongLat", stepAngle, pointsLongLat)
381
380
  return pointsLongLat;
382
381
  }