Skip to content

Commit 704006f

Browse files
committed
Fix typings
1 parent 822bcdb commit 704006f

File tree

5 files changed

+15
-21
lines changed

5 files changed

+15
-21
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,7 @@ Properties of returned for a geolocation point.
131131

132132
## Related Projects
133133

134-
**Open Azure Maps Web SDK modules**
135-
136-
* [Azure Maps Animation module](https://github.com/Azure-Samples/azure-maps-animations)
137-
* [Azure Maps Fullscreen Control module](https://github.com/Azure-Samples/azure-maps-fullscreen-control)
138-
* [Azure Maps Selection Control module](https://github.com/Azure-Samples/azure-maps-selection-control)
139-
* [Azure Maps Sync Map module](https://github.com/Azure-Samples/azure-maps-sync-maps)
140-
* [Azure Maps Services UI module](https://github.com/Azure-Samples/azure-maps-services-ui)
141-
142-
**Additional projects**
143-
134+
* [Azure Maps Web SDK Open modules](https://github.com/microsoft/Maps/blob/master/AzureMaps.md#open-web-sdk-modules) - A collection of open source modules that extend the Azure Maps Web SDK.
144135
* [Azure Maps Web SDK Samples](https://github.com/Azure-Samples/AzureMapsCodeSamples)
145136
* [Azure Maps Gov Cloud Web SDK Samples](https://github.com/Azure-Samples/AzureMapsGovCloudCodeSamples)
146137
* [Azure Maps & Azure Active Directory Samples](https://github.com/Azure-Samples/Azure-Maps-AzureAD-Samples)

dist/azure-maps-geolocation-control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ MIT License
445445
this._options.showUserLocation = options.showUserLocation;
446446
if (this._gpsMarker) {
447447
this._gpsMarker.setOptions({
448-
visible: this._isActive && this._options.showUserLocation
448+
visible: this._isActive && options.showUserLocation
449449
});
450450
}
451451
else if (this._lastKnownPosition) {

dist/azure-maps-geolocation-control.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/extensions/EventManager.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { GeolocationControlEvents, GeolocationControl } from '../control';
1+
import * as azmaps from "azure-maps-control";
2+
import { GeolocationControl } from '../control';
3+
import { GeolocationProperties } from 'src/control/GeolocationProperties';
24

35
/**
46
* This module partially defines the map control.
@@ -20,31 +22,31 @@ declare module "azure-maps-control" {
2022
* @param target The `GeolocationControl` to add the event for.
2123
* @param callback The event handler callback.
2224
*/
23-
add(eventType: "ongeolocationerror", target: GeolocationControl, callback: (e: GeolocationControlEvents) => void): void;
25+
add(eventType: "ongeolocationerror", target: GeolocationControl, callback: (e: PositionError) => void): void;
2426

2527
/**
2628
* Adds an event to the `GeolocationControl`.
2729
* @param eventType The event name.
2830
* @param target The `GeolocationControl` to add the event for.
2931
* @param callback The event handler callback.
3032
*/
31-
add(eventType: "ongeolocationsuccess", target: GeolocationControl, callback: (e: GeolocationControlEvents) => void): void;
33+
add(eventType: "ongeolocationsuccess", target: GeolocationControl, callback: (e: azmaps.data.Feature<azmaps.data.Point, GeolocationProperties>) => void): void;
3234

3335
/**
3436
* Adds an event to the `GeolocationControl` once.
3537
* @param eventType The event name.
3638
* @param target The `GeolocationControl` to add the event for.
3739
* @param callback The event handler callback.
3840
*/
39-
addOnce(eventType: "onerror", target: GeolocationControl, callback: (e: GeolocationControlEvents) => void): void;
41+
addOnce(eventType: "onerror", target: GeolocationControl, callback: (e: PositionError) => void): void;
4042

4143
/**
4244
* Adds an event to the `GeolocationControl` once.
4345
* @param eventType The event name.
4446
* @param target The `GeolocationControl` to add the event for.
4547
* @param callback The event handler callback.
4648
*/
47-
addOnce(eventType: "onsuccess", target: GeolocationControl, callback: (e: GeolocationControlEvents) => void): void;
49+
addOnce(eventType: "onsuccess", target: GeolocationControl, callback: (e: azmaps.data.Feature<azmaps.data.Point, GeolocationProperties>) => void): void;
4850

4951
/**
5052
* Removes an event listener from the `GeolocationControl`.

typings/index.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,31 +136,31 @@ declare module "azure-maps-control" {
136136
* @param target The `GeolocationControl` to add the event for.
137137
* @param callback The event handler callback.
138138
*/
139-
add(eventType: "geolocationerror", target: atlas.control.GeolocationControl, callback: (e: atlas.control.GeolocationControlEvents) => void): void;
139+
add(eventType: "ongeolocationerror", target: atlas.control.GeolocationControl, callback: (e: PositionError) => void): void;
140140

141141
/**
142142
* Adds an event to the `GeolocationControl`.
143143
* @param eventType The event name.
144144
* @param target The `GeolocationControl` to add the event for.
145145
* @param callback The event handler callback.
146146
*/
147-
add(eventType: "geolocationsuccess", target: atlas.control.GeolocationControl, callback: (e: atlas.control.GeolocationControlEvents) => void): void;
147+
add(eventType: "ongeolocationsuccess", target: atlas.control.GeolocationControl, callback: (e: azmaps.data.Feature<azmaps.data.Point, atlas.GeolocationProperties>) => void): void;
148148

149149
/**
150150
* Adds an event to the `GeolocationControl` once.
151151
* @param eventType The event name.
152152
* @param target The `GeolocationControl` to add the event for.
153153
* @param callback The event handler callback.
154154
*/
155-
addOnce(eventType: "geolocationerror", target: atlas.control.GeolocationControl, callback: (e: atlas.control.GeolocationControlEvents) => void): void;
155+
addOnce(eventType: "onerror", target: atlas.control.GeolocationControl, callback: (e: PositionError) => void): void;
156156

157157
/**
158158
* Adds an event to the `GeolocationControl` once.
159159
* @param eventType The event name.
160160
* @param target The `GeolocationControl` to add the event for.
161161
* @param callback The event handler callback.
162162
*/
163-
addOnce(eventType: "geolocationsuccess", target: atlas.control.GeolocationControl, callback: (e: atlas.control.GeolocationControlEvents) => void): void;
163+
addOnce(eventType: "onsuccess", target: atlas.control.GeolocationControl, callback: (e: azmaps.data.Feature<azmaps.data.Point, atlas.GeolocationProperties>) => void): void;
164164

165165
/**
166166
* Removes an event listener from the `GeolocationControl`.
@@ -172,4 +172,5 @@ declare module "azure-maps-control" {
172172
}
173173
}
174174

175+
175176
export = atlas;

0 commit comments

Comments
 (0)