ThinkGeo.com    |     Documentation    |     Premium Support

Map Loads: Input double value is out of range. (Parameter 'widthInPixel')

Hello,

I am receiving an error “The input double value is out of range. (Parameter ‘widthInPixel’)” when my map is initially being loaded. It errors when setting the CurrentExtent of the map. After it errors, it displays the error message and then I click OK and then it runs the map load code again after which it successfully adds the CurrentExtent without issues.

I am not sure why the map is loading twice (I would assume it errors and then tries again) and why the second time it loads successfully. I have currently updated to nuget version 12.2.15 and still getting the issue.

Thanks,
Eric

Code where it errors:

mapViewActivities.ZoomLevelSet = new ThinkGeoCloudMapsZoomLevelSet(512);
mapViewActivities.CurrentExtent = new RectangleShape(-14180662, 5547256, -7832569, 1777465);

Did you find an answer to this error?
I just ignored it.

Thanks Mahdi,
I tested with the latest release 12.3. We have fixed this one. Could you please try again.

Thanks

Frank

@Frank4
I found the bug. It happens because of Map not loaded and the code tries to change CurrentExtent.

Thanks Mahdi,
Go ahead let us know if you have more questions.

Thanks

Frank