Skip to content

Commit

Permalink
+ General map return fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCodesUFG committed Feb 3, 2025
1 parent 12e34dc commit fd5f6ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
6 changes: 2 additions & 4 deletions client/src/app/@core/components/ol-map/ol-map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ export class OlMapComponent implements AfterViewInit {
) {}

ngAfterViewInit(): void {
const self = this;

this.setSize();

console.log(this.mapService.map)

// Primeiro resetar o tager para quando aplicado o 'map' ele reconhecer a alteração.
this.mapService.map.setTarget('')
this.mapService.map.setTarget('map')

this.setControlls();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import TileLayer from 'ol/layer/Tile';
import VectorLayer from 'ol/layer/Vector';
import CircleStyle from 'ol/style/Circle';
import VectorSource from 'ol/source/Vector';
import TileGrid from 'ol/tilegrid/TileGrid';
import * as Proj from 'ol/proj';
import { MapEvent, Overlay } from 'ol';
import { Interaction, Modify, Snap } from 'ol/interaction';
Expand Down Expand Up @@ -279,8 +278,6 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
'measureArea',
];

// TODO: Ferramenta de desenhar pontos.
// TODO: Ferramentas de desenhar poderiam estar dentro da ferramenta de análise.
public controlObjs: { [key: string]: Control } = {
filter: {
icon: 'fg-map-search',
Expand Down Expand Up @@ -320,8 +317,6 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
geojson: {},
};

public tileGrid: TileGrid;

public year: any;
public isShowIformats: boolean = true;

Expand All @@ -332,6 +327,7 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
private draw: any;
private snap: any;
public defaultStyle: Style;

public geoJsonStyles: any = {
Point: new Style({
image: new CircleStyle({
Expand Down Expand Up @@ -480,11 +476,6 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
this.isMobile = false;
}

this.tileGrid = new TileGrid({
extent: PROJECTION!.getExtent(),
resolutions: this.getResolutions(PROJECTION),
tileSize: 512,
});

this.defaultStyle = new Style({
fill: new Fill({
Expand All @@ -508,6 +499,7 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
this.mapService.addEvent('moveend', (event: MapEvent) =>
this.onZoom(event)
);

this.mapService.addEvent('singleclick', (event: MapEvent) =>
this.onDisplayFeatureInfo(event)
);
Expand Down Expand Up @@ -1540,7 +1532,7 @@ export class GeneralMapComponent implements OnInit, OnDestroy, Ruler {
this.mapService.resetZoom();
}

closeDetailsWindow() {
public closeDetailsWindow() {
Object.keys(this.controlObjs).forEach((key) => {
this.controlObjs[key].active = false;
});
Expand Down

0 comments on commit fd5f6ff

Please sign in to comment.