diff --git a/src/examples/AzureLayer.tsx b/src/examples/AzureLayer.tsx new file mode 100644 index 0000000..0b41527 --- /dev/null +++ b/src/examples/AzureLayer.tsx @@ -0,0 +1,98 @@ +import React, { useMemo } from "react"; +import { + AzureMapsProvider, + AzureMap, + AzureMapDataSourceProvider, + AzureMapLayerProvider, + AzureMapFeature, + AzureMapHtmlMarker, + IAzureMapOptions, + IAzureMapHtmlMarkerEvent +} from "react-azure-maps"; +import atlas, { AuthenticationType, data } from "azure-maps-control"; + +const AzureLayer: React.FC = () => { + const point1 = new data.Position(-100.01, 45.01); + const point2 = new data.Position(-100.2, 45.1); + + + const option: IAzureMapOptions = useMemo(() => { + return { + authOptions: { + authType: AuthenticationType.subscriptionKey, + subscriptionKey: "tTk1JVEaeNvDkxxnxHm9cYaCvqlOq1u-fXTvyXn2XkA" + }, + center: [-100.01, 45.01], + zoom: 2, + view: "Auto" + }; + }, []); + + const onClick = () => { + console.log("ASD"); + }; + + const azureHtmlMapMarkerOptions = { + htmlContent: '
', + position: [-110, 45] + }; + + const eventToMarker: Array