There was an error deserializing the object of type in Firefox 3
|
jmaronge
|
|
|
I am getting the following error in Firefox 3 when interacting with the map. Zooming, clicking, etc causes the error.
There was an error deserializing the object of type Simplovation.Web.Maps.VE.AsyncMapData. The value '277.5' cannot be parsed as the type 'Int32'.
Any ideas?
Jason
|
|
|
|
Chris Pietschmann
|
|
Could you send me a code sample of what you're setting the Map's properties to, and/or what you're setting the Shape properties to in order to duplicate this? There may be an "unexpected" character included in a string value that one of the Map or Shape properties is getting set to. Once I know what the "unexpected" character is, I'll be able to figure out what the problem is.
|
|
|
|
jmaronge
|
|
|
I am trying like heck to get a reproducable sample to you, but it seems to one happen in my specific setup. I did find out somemore info. The error:
145|error|500|There was an error deserializing the object of type Simplovation.Web.Maps.VE.AsyncMapData
. The value '51.5' cannot be parsed as the type 'Int32'.|
The value it is talking about is the mapY value. Here is the Post data for the
| | ctl00$ContentPlacehat Holder1$Map1$UP_HiddenField | {"EventName":"onclick","EventArgs":{"elementID":null,"eventName":"onclick","zoomLevel":13,"mapStyle":"r","birdseyeSceneID":null,"birdseyeSceneOrientation":null,"leftMouseButton":true,"rightMouseButton":false,"middleMouseButton":false,"mouseWheelChange":-1,"screenX":1104,"screenY":386,"clientX":566,"clientY":132,"mapX":355,"mapY":51.5,"altKey":false,"ctrlKey":false,"shiftKey":false},"ZoomLevel":13,"Latitude":32.40025507624444,"Longitude":-99.5351028442383,"MapStyle":1,"ShowDashboard":true,"MapView":{"TopLeftLatLong":{"Latitude":32.432860254548714,"Longitude":-99.58660125732423,"Altitude":null,"AltitudeMode":null,"_reserved":null},"BottomRightLatLong":{"Latitude":32.36763811849231,"Longitude":-99.48360443115236,"Altitude":null,"AltitudeMode":null,"_reserved":null}},"ClickedLatitude":32.4253983313722,"ClickedLongitude":-99.52566146850589,"Direction_Locations":null,"Direction_RouteOptions":null,"MapLoadedEventArgs":null,"CustomInfoBoxStylesEnabled":null,"ShowTraffic":false,"ShowTrafficLegend":false,"TrafficLegendText":null,"Pitch":null,"Altitude":null,"Heading":null,"MapMode":1,"DistanceUnit":0,"Layers":[{"Title":"Unsaved Collection","Description":"","Shapes":[{"ClientID":"msftve_1000_200000","CustomIcon":null,"Description":"Lat: 32.4045306484986Lng: -99.5163917541504","FillColor":null,"IconAnchor":{"Latitude":32.4045306484986,"Longitude":-99.5163917541504,"Altitude":null,"AltitudeMode":null,"_reserved":null},"LineColor":null,"LineWidth":2,"MoreInfoURL":"","PhotoURL":"","Points":[{"Latitude":32.4045306484986,"Longitude":-99.5163917541504,"Altitude":0,"AltitudeMode":0,"_reserved":null}],"Title":"d","Type":0,"Altitude":0,"ZIndex":1000,"Tag":null}],"Visible":true,"Tag":null}]} | | ctl00$ContentPlaceHolder1$Map1$UP_HiddenFindField | {"Places":[{"Name":"1728 Friar Ct, Clyde, TX 79510-3901","LatLong":{"Latitude":32.404768,"Longitude":-99.516383,"Altitude":null,"AltitudeMode":null,"_reserved":null},"LatLongRect":{"TopLeftLatLong":{"Latitude":32.41442479396509,"Longitude":-99.50113415193657,"Altitude":null,"AltitudeMode":null,"_reserved":null},"BottomRightLatLong":{"Latitude":32.395111206034905,"Longitude":-99.53163184806344,"Altitude":null,"AltitudeMode":null,"_reserved":null}},"Score":0,"MatchConfidence":0,"MatchCode":1,"Precision":0,"Locations":[{"LatLong":{"Latitude":32.404768,"Longitude":-99.516383,"Altitude":null,"AltitudeMode":null,"_reserved":null},"Precision":0}]}],"Results":[]} |
you will notice that the
"clientX":566,"clientY":132,"mapX":355,"mapY":51.5,
51.5 or what ever the number is seems to match the error message all the time. It happens right click/drag and then release the mouse.
Here is how my map is defined:
< Simplovation:Map runat="server" ID="Map1" Width="600px" Height="450px" CssClass="map"
OnClick="Map1_Click" OnFindLoaded="Map1_FindLoaded" OnFindLocationsLoaded="Map1_FindLocationsLoaded"
OnChangeView="Map1_ChangeView" MapStyle="Hybrid"
ShowTraffic="True" ShowTrafficLegend="True" />
For the shapes I am setting the title to the address:
var shape = new Shape(new LatLong(lat, lon))
{
Title = address,
Description = ("Lat: " + lat + "<br/>Lng: " + lon)
};
Map1.AddShape(shape);
Let me know if there is anymore info you need from me.
Jason
|
|
|
Chris Pietschmann
|
|
First, I have to say that I have not been able to duplicate this issue, but thanks for the detailed description of exactly what is happening.
Second, this will take a little "messaging" of the mapX and mapY values to fix/prevent the issue from occuring. Basically what will need to happen is, if the value is not an integer, then it'll be converted to an integer before posted back to the server. I will work to get this fixed in the next update release.
|
|
|
|
jmaronge
|
|
|
I assume that this fix did not make it into the V2.0.0.1 that was just released?
Jason
|
|
|
|
Chris Pietschmann
|
|
No the fix for this didn't make it into the v2.00.01 update release. It will be included in the next update.
|
|
|
|
ABECON
|
|
Is there any ETA on this fix? We're currently building a new website with the VE control and it needs to work in all major browsers.
It seems the value that triggers the error is always a .5 value. Which is a bit weird, as you can't click half a pixel.
|
|
|
|
Chris Pietschmann
|
|
The latest version (v2.00.02) that we just released today, contains a fix for this type of issue. If you still experience issue, please let us know.
|
|
|
|
kevin@rentvillas.com
|
|
Here is another fix to this issue... for those with the 1.0 library. Include the following in the same page as the map control:
<script type="text/javascript"> (function() { var mouseEvt; if (typeof document.createEvent !== 'undefined') { mouseEvt = document.createEvent('MouseEvents'); } if (mouseEvt && mouseEvt.__proto__ && mouseEvt.__proto__.__defineGetter__) { mouseEvt.__proto__.__defineGetter__('pageX', function() { return parseInt(this.clientX + window.pageXOffset); }); mouseEvt.__proto__.__defineGetter__('pageY', function() { return parseInt(this.clientY + window.pageYOffset); }); } })(); </script>
|
|
|
|
kevin@rentvillas.com
|
|
Hi Chris,
It looks like I jumped the gun. I'm getting a similiar error, and while my fix appeared to resolve the issue in our development environment, it did not resolve the issue in production. Let me know if you'd like me to repost in the 1.0 forum since we're on 1.0.
To duplicate: 1) Visit: http://www.rentvillas.com/PropertyMap.aspx?Catalog=13084 2) Drag map and drop while mouse remains in the map window (if you drag the map and drop while the mouse is off the map control window, there is no error thrown.
Exception information: Exception type: Exception Exception message: 190.5 is not a valid value for Int32.
Here's the stack trace: Thread information: Thread ID: 8 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) at System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object propertyValue, Object o, String memberName, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object propertyValue, Object o, String memberName, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input) at Simplovation.Web.Maps.VE.Map.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
|
|
|
Chris Pietschmann
|
|
I will look further into this issue with version 1.0, and release an update as necessary. Thanks.
It would be better to post questions/issues regarding version 1.0 in the version 1.0 forums. Please post v1 question/answers there in the future.
|
|
|
|
|