-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map controls and SearchService response object #54
Comments
I am having the same issue with azure maps controls (issue 1). 'position' for the controls is not working with latest ng-azure-maps version. They way I resolved is by downgrading all the packages to the following: "azure-maps-control": "^2.1.10", Then the position is able to be assigned. My project is on Angular 13. Hopefully this can get resolved as the way I resolved the problem is not ideal and I would like to have the latest ng-azure-maps installed and working. |
Sorry I didn't response earlier, I don't currently have a lot of time to work on this library. I'll try to take a look at this today. |
I took a quick look at the different controls and the position attribute, and so far it looks fine to me. I have tested it with the latest version and targeting the latest version of azure-maps-control. Displaying control and positioning them like them did not raise any error :
Could you please give me more information or send me a repo where I could reproduce the issue ? |
Following an Azure Maps tutorial online found here:https://www.youtube.com/watch?v=wpTAU9_H7ro
I have had several issues which have meant I am unable to progress:
<azure-map [center]="[-0.182679, 52.336618]" [zoom]="11" [showLogo]="false" (onClick)="mapClick($event.event)"
(onReady)="mapReady($event)">
constructor(private readonly searchService: SearchService) {}
mapClick(event:atlas.MapMouseEvent) {
console.log(event.position)
}
mapReady (event: IMapEvent) {
this.searchService.searchAddress("ramsey", { countrySet: ['uk', 'us']})
.subscribe(response => {
const features = [];
for(const result of response.results) {
event.map.markers.add(
new atlas.HtmlMarker({
position: [result.position.lon, result.position.lat]
})
)
features.push(new atlas.data.Point([result.position.lon, result.position.lat]))
}
event.map.setCamera({
bounds:atlas.data.BoundingBox.fromData(features)
})
})
}
}
(parameter) response: atlas.service.Models.SearchAddressResponse
Object is possibly 'undefined'.ts(2532)
The text was updated successfully, but these errors were encountered: