Skip to content

Commit

Permalink
non java code generator
Browse files Browse the repository at this point in the history
  • Loading branch information
JLSchaap committed Nov 7, 2023
1 parent 9d6991f commit 8e49ab9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import GeoJSON from 'ol/format/GeoJSON'
import { Geometry } from 'ol/geom'

import { ProjectionLike } from 'ol/proj'
import { FeatureCollectionGeoJSON } from './openapi/model/featureCollectionGeoJSON'
import { featureCollectionGeoJSON } from './openapi/models/featureCollectionGeoJSON'

export type DataUrl = {
url: string
Expand All @@ -22,7 +22,7 @@ export class FeatureServiceService {

getFeatures(url: DataUrl): Observable<Feature<Geometry>[]> {
console.log(url)
return this.http.get<FeatureCollectionGeoJSON>(url.url).pipe(
return this.http.get<featureCollectionGeoJSON>(url.url).pipe(
map(data => {
return new GeoJSON().readFeatures(data, { featureProjection: url.projection })
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import WMTSTileGrid from 'ol/tilegrid/WMTS'
import { take } from 'rxjs/operators'
import { NgChanges } from '../app.component'
import { DataUrl, FeatureServiceService } from '../feature-service.service'
import { FeatureCollectionGeoJSON } from '../openapi/model/featureCollectionGeoJSON'
import { featureCollectionGeoJSON } from '../openapi/models/featureCollectionGeoJSON'

export function exhaustiveGuard(_value: never): never {
throw new Error(`ERROR! Reached forbidden guard function with unexpected value: ${JSON.stringify(_value)}`)
}
Expand All @@ -38,7 +39,7 @@ export class FeatureViewComponent implements OnChanges {
mapHeight = 400
mapWidth = 600
map: OLMap = this.getMap()
featureCollectionGeoJSON!: FeatureCollectionGeoJSON
featureCollectionGeoJSON!: featureCollectionGeoJSON
features: Feature<Geometry>[] = []
boxLayer!: VectorLayer<VectorSource<Geometry>>

Expand Down

0 comments on commit 8e49ab9

Please sign in to comment.