Skip to content

Commit

Permalink
init, added marker png to component folder
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBirtch-aot committed Jul 29, 2024
1 parent 01cb3d5 commit 062e9eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion components/src/components/Map/services/MapService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const DEFAULT_LAYER_ATTRIBUTION =
const DEFAULT_MAP_ZOOM = 5;
const DECIMALS_LATLNG = 5; // the number of decimals of latitude and longitude to be displayed in the marker popup
const COMPONENT_EDIT_CLASS = 'component-edit-tabs';
const CUSTOM_MARKER_URI = '../Common/marker-icon.png/';

interface MapServiceOptions {
mapContainer: HTMLElement;
Expand Down Expand Up @@ -43,6 +44,8 @@ class MapService {
.setContent('<p>Only one marker for submission</p>')
.openOn(map);
} else {
console.log(layer);
layer.icon({ iconUrl: CUSTOM_MARKER_URI });
drawnItems.addLayer(layer);
}
this.bindPopupToLayer(layer);
Expand All @@ -68,7 +71,6 @@ class MapService {
viewMode,
} = options;


if (drawOptions.rectangle) {
drawOptions.rectangle.showArea = false;
}
Expand All @@ -81,6 +83,8 @@ class MapService {
}).addTo(map);
// Initialize Draw Layer
let drawnItems = new L.FeatureGroup();
//({ iconUrl: '../common/marker-icon.png/' });

map.addLayer(drawnItems);
// Add Drawing Controllers

Expand Down

0 comments on commit 062e9eb

Please sign in to comment.