Skip to content

Commit

Permalink
The EMP map was reusing the imageOffset of the mil standard icon when…
Browse files Browse the repository at this point in the history
… switching to a dot placemark. Setting the dot image offset to .5, .5 fixed the issue. The issue was not in WebWorldWind. # 281
  • Loading branch information
alberto-acevedo committed May 15, 2017
1 parent 74fcd63 commit 7e3e344
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ EMPWorldWind.editors.primitiveBuilders = (function() {
// Optimization
attributes.imageScale = 1;
attributes.imageSource = EMPWorldWind.utils.selectHighAltitudeRangeImage(feature.symbolCode);
attributes.imageOffset = new WorldWind.Offset(WorldWind.OFFSET_FRACTION, 0.5, WorldWind.OFFSET_FRACTION, 0.5);// Centers the image on the geographic position.
highlightAttributes = new WorldWind.PlacemarkAttributes();
highlightAttributes.imageColor = WorldWind.Color.WHITE;
highlightAttributes.imageSource = attributes.imageSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ EMPWorldWind.eventHandlers.triggerRenderUpdate = function() {
feature.isHighAltitudeRangeImage = true;
// dot image based on affiliation
feature.shapes[0].attributes._imageSource = EMPWorldWind.utils.selectHighAltitudeRangeImage(feature.feature.symbolCode);
feature.shapes[0].attributes.imageOffset = new WorldWind.Offset(WorldWind.OFFSET_FRACTION, 0.5, WorldWind.OFFSET_FRACTION, 0.5);// Centers the image on the geographic position.
feature.shapes[0].highlightAttributes._imageSource = feature.shapes[0].attributes._imageSource;
feature.singlePointAltitudeRangeMode = this.singlePointAltitudeRangeMode;
feature.feature.singlePointAltitudeRangeMode = this.singlePointAltitudeRangeMode;
Expand Down

0 comments on commit 7e3e344

Please sign in to comment.