Map sometimes after a some time dont react on events without error
See original GitHub issueMap after some time dont react on events without any errors. I`m using Angular with {N} html:
<GridLayout id="bookingMapPage" columns="*" rows="auto,auto,*,auto">
<GridLayout columns="25,*,25" rows="auto" class="searchInput">
<Label col='0' row='0' text="" class="fa"></Label>
<TextField col='1' row='0' [(ngModel)]="address" (ngModelChange)="onAddressChanged($event)" (tap)="isSearchTaped=true"></TextField>
<Label col='2' row='0' text="" class="fa" (tap)="address=''"></Label>
</GridLayout>
<MapView col="0" row="1" rowspan="2" (mapReady)="onMapReady($event)" (coordinateTapped)="mapTapped($event)" (cameraChanged)="onCameraChanged($event)" ></MapView>
<Button col="0" row="3" text="next" class="submitBtn"></Button>
</GridLayout>
public mapTapped(event) {
console.log('tapped');
this.centerMap(event.position);
this.mapView.removeAllMarkers();
this.getAdress(event.position);
this.addMarker({
location: event.position
});
};
public onCameraChanged(event) {
console.log('camera');
let camera = event.camera;
let position = Position.positionFromLatLng(camera.latitude,camera.longitude);
this.isCustomLocation = true
this.getAdress(position);
this.mapView.removeAllMarkers();
this.addMarker({
location: position
});
}
private centerMap(position: any) {
if (!this.mapView || !position) return;
this.isSearchTaped = false;
this.mapView.latitude = position.latitude;
this.mapView.longitude = position.longitude;
this.mapView.zoom = this.cameraZoom;
}
private addMarker(args: AddMarkerArgs) {
console.log(this.mapView);
if (!this.mapView || !args || !args.location) return;
let marker = new Marker();
marker.position = Position.positionFromLatLng(args.location.latitude, args.location.longitude);
this.mapView.addMarker(marker);
};
Its look like after some time map dont fire callbacks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
TypeError Handling in React.js for Map Function | Pluralsight
This error occurs because your data is not an array. The .map() function only works with arrays. First, you'll need to confirm your...
Read more >map is not displaying in browser; no error in console #186
I am using @react-google-maps, the map initially loaded good, i have changed the latitude and longitude using onClick event in GoogleMap using ...
Read more >React JS - Uncaught TypeError: this.props.data.map is not a ...
It happens because the component is rendered before the async data arrived, you should control before to render. I resolved it in this...
Read more >My most frequent React errors and how you fix them
I want to share some of the common errors/problems I often encounter in React with solutions on how to overcome each of them....
Read more >Using setTimeout in React components (including hooks)
Using timeouts in React isn't as straightforward as you may think. In this article, you'll learn how to avoid mistakes when using them...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 Im also able to reproduce this behavior. On IOS mostly.
I confirm that it works on iOS with 2.1.3