|
public getMapBounds() {
return [this.maps.pointToLatLong(0, 0), this.maps.pointToLatLong(this.maps.availableSize.height, this.maps.availableSize.width)];
} |
|
public GetMapBounds() {
let pointone: GeoPosition = this.maps.pointToLatLong(0, 0); let pointtwo: GeoPosition = this.maps.pointToLatLong(this.maps.availableSize.height, this.maps.availableSize.width); let mapBounds: object = { minLat: Math.min(pointone.latitude, pointtwo.latitude), minLong: Math.min(pointone.longitude, pointtwo.longitude), maxLat: Math.max(pointtwo.latitude, pointone.latitude), maxLong: Math.max(pointtwo.longitude, pointone.longitude) }; return mapBounds; } |
Hello,
Thanks a lot, with your help, I managed to make it works.
I'm facing a last issue:
my markers is displayed as picture with the help of the properties shape='Image' and imageUrlValuePath: 'pict' (pict is a property of my marker object). Alas the marker is not rendered at all (nothing in the map, not even a broken picture).
I've managed to track down the problem to this line of code in the markerShapeChoose function in ej2-maps.es2015.js:
const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath) && !isNullOrUndefined(data[eventArgs.imageUrlValuePath])) ?
getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : eventArgs.imageUrl;
eventArgs.imageUrl = shapeImage;
Changing this line to:
const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath) && !isNullOrUndefined(data[eventArgs.imageUrlValuePath])) ?
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : data[eventArgs.imageUrlValuePath]) : eventArgs.imageUrl;
eventArgs.imageUrl = shapeImage;
And voila! my markers are displayed. Should I fill a bug report for this?