The marker is not centered with IE

Apr 10, 2008 at 11:03 AM
Hi,
congratulations for the awesome control.
I have an issue.
I have made a simple sample and when i use Internet explorer i don't see the marker on the map, i have to move in the map to see it.
Instead, with Firefox it's centered and i see the marker.

Thanks
Regards
Mark
Coordinator
Apr 10, 2008 at 12:25 PM
Hi,
Very weird indeed.
Can you send me some code details?

Regards,
Apr 10, 2008 at 12:51 PM
This is my sample:

aspx page:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form id="Form1" runat="server">
<artem:GoogleMap ID="GoogleMap1" runat="server" Width="500" Height="400"
Key="ABQIAAAAygKILfJghhxDOx31nzOfbBSIBlSZYq20zcO6w--Rh78rLpLsmBTN7TmBmi0rgYZ1NkJcQH90FZOLqg" Latitude="37.080525567361924" Longitude="14.229462146759033" Zoom="16" BorderStyle="Solid" BorderColor="#999999" BorderWidth="1" EnableInfoWindow="true">
<Markers>
<artem:GoogleMarker Latitude="37.080525567361924" Longitude="14.229462146759033" Text="<font class=Stile6><b>Test</b></font>">
</artem:GoogleMarker>
</Markers>
</artem:GoogleMap>
</form>
</asp:Content>


Web.config:
<pages>
<controls>
<add tagPrefix="artem" namespace="Artem.Web.UI.Controls" assembly="Artem.GoogleMap"/>
</controls>
</pages>

Thanks
Apr 11, 2008 at 8:39 AM
I found that the issue is related to the latest release 3.2.
I have tried with the release 2.9.5 and 2.9 and it works very well both browser.
So is there a possible bug in the latest release?

Thanks
Apr 16, 2008 at 1:58 PM
Haven't you solved in the latest release?
Coordinator
Apr 16, 2008 at 3:18 PM
Hi,
I think so.
Have in mind, if you are using custom image for icon, then you have to set the proper IconSize and IconAnchor.
The important part for your case is IconAnchor, where 0,0 is top left corner.
Let's say your custom image is size 16x16, then for usaul scenario you should set IconAnchro="8,16"

Yeah, it is a little bit inconvenient that you should set IconAnchor, but I have added that, beacuse it fixes next issue

Hope this helps
Coordinator
Apr 16, 2008 at 3:18 PM
Hi,
I think so.
Have in mind, if you are using custom image for icon, then you have to set the proper IconSize and IconAnchor.
The important part for your case is IconAnchor, where 0,0 is top left corner.
Let's say your custom image is size 16x16, then for usaul scenario you should set IconAnchro="8,16"

Yeah, it is a little bit inconvenient that you should set IconAnchor, but I have added that, beacuse it fixes next issue

Hope this helps
Apr 17, 2008 at 9:08 AM
Hi,
i use a custom image and i set the size 16x16 and IconAnchor="8,16" but the issue persists.
In IE the marker is placed at 0,0, instead in firefox is placed at the center.
I think that the issue is not the marker, but the map, in fact if i delete the marker and i display only the map, this is placed in other position in IE.

Thanks in advance and sorry for my trouble.
Coordinator
Apr 17, 2008 at 12:07 PM
Hi,
The GoogleMarker is AutoPan by default, which means the map is panned to show the marker in the center.
That's why when you remove it the map is panned to its center.
Then try to set AutoPan property of the marker to false and check if that solves you problem with centering a custom icon.
If that's the case then I'll update the relese with AutoPan of the GoogleMarker set to false, by default.

Regards
Apr 17, 2008 at 12:38 PM
Sorry,
but it doesn't work.
I don't understand because in Firefox it works.

Regards