Skip to content
Snippets Groups Projects
Commit 635fd1e7 authored by ["Younes MHARRECH"]'s avatar ["Younes MHARRECH"]
Browse files

Fond de plan

parent 43e68d34
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import OSM from 'ol/source/OSM';
import ImageWMS from 'ol/source/ImageWMS';
import { fromLonLat } from 'ol/proj';
import VectorSource from 'ol/source/Vector';
import GeoJSON from 'ol/format/GeoJSON';
......@@ -15,6 +16,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { ActivatedRoute } from '@angular/router';
import { User } from 'src/app/models/user';
import { StyleCalque } from 'src/app/utlis/style';
import ImageLayer from 'ol/layer/Image';
@Component({
selector: 'frt-homemap',
......@@ -73,7 +75,7 @@ export class HomemapComponent implements OnInit {
style: StyleCalque.styleFunction
});
vectorCalque.setProperties({ name: 'Calque Plantabilité', id:'calque' });
vectorCalque.setProperties({ name: 'Plantabilité', id:'calque' });
const raster = new TileLayer({
source: new OSM()
......@@ -81,13 +83,24 @@ export class HomemapComponent implements OnInit {
raster.setProperties({ name: 'Open Street Map', id:'osm' });
const raster2 = new ImageLayer({
source: new ImageWMS({
projection: 'EPSG:404000',
url: 'http://plantabilite.datagora.erasme.org/geoserver/wms',
params: {'LAYERS': 'Métropole_ERASME:tiles_temp'},
}),
});
raster2.setProperties({ name: 'Plantabilité Raster', id:'calqueRaster' });
this.map = new Map({
interactions: defaultInteractions().extend([new DragRotateAndZoom()]),
view: new View({
center: fromLonLat([environment.centerLongitude, environment.centerLatitude]),
zoom: 11
}),
layers: [raster, vectorCommunes, vectorCalque]
layers: [raster, raster2, vectorCommunes, vectorCalque]
});
}
......
......@@ -2,7 +2,11 @@ export const environment = {
production: true,
searchUrl: 'https://api-adresse.data.gouv.fr/search',
communesURL:
'https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=adr_voie_lieu.adrcomgl&outputFormat=application/json; subtype=geojson&SRSNAME=EPSG:4326&startIndex=0',
'https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=adr_voie_lieu.adrcomgl&outputFormat=application/json; subtype=geojson&SRSNAME=EPSG:3857&startIndex=0',
calqueURL:
'http://plantabilite.datagora.erasme.org/geoserver/M%C3%A9tropole_ERASME/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=M%C3%A9tropole_ERASME%3Atiles_temp&maxFeatures=1000&outputFormat=application%2Fjson&SRSNAME=EPSG:3857',
calqueLegendURL:
'http://plantabilite.datagora.erasme.org/geoserver/M%C3%A9tropole_ERASME/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=M%C3%A9tropole_ERASME%3Atiles_temp&LEGEND_OPTIONS=columns:3',
centerLatitude: 45.7675,
centerLongitude: 4.8345,
backEndUrl:'http://51.158.108.104:3000',
......
......@@ -6,9 +6,9 @@ export const environment = {
production: false,
searchUrl: 'https://api-adresse.data.gouv.fr/search',
communesURL:
'https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=adr_voie_lieu.adrcomgl&outputFormat=application/json; subtype=geojson&SRSNAME=EPSG:4326&startIndex=0',
'https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=adr_voie_lieu.adrcomgl&outputFormat=application/json; subtype=geojson&SRSNAME=EPSG:3857&startIndex=0',
calqueURL:
'http://plantabilite.datagora.erasme.org/geoserver/M%C3%A9tropole_ERASME/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=M%C3%A9tropole_ERASME%3Atiles_temp&maxFeatures=1000&outputFormat=application%2Fjson&SRSNAME=EPSG:4326',
'http://plantabilite.datagora.erasme.org/geoserver/M%C3%A9tropole_ERASME/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=M%C3%A9tropole_ERASME%3Atiles_temp&maxFeatures=1000&outputFormat=application%2Fjson&SRSNAME=EPSG:3857',
calqueLegendURL:
'http://plantabilite.datagora.erasme.org/geoserver/M%C3%A9tropole_ERASME/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=M%C3%A9tropole_ERASME%3Atiles_temp&LEGEND_OPTIONS=columns:3',
centerLatitude: 45.7675,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment