Hi, New to the list - but hoping that someone can help. I''ve recently used Mapstraction on a new website to show a simple Google map with a custom marker / marker shadow. All is working as expected in Firefox, and even IE. But in Safari/Chrome/Webkit browsers the marker and shadowicon are both showing - along with an extra shadow (believe it may be the default one). Is this an issue anyone else has encountered? Using the following code to create the marker: var mapstraction = new mxn.Mapstraction(''themap'',''google''); var myPoint = new mxn.LatLonPoint(latitude, longitude); mapstraction.setCenterAndZoom(myPoint, 14); var marker = new mxn.Marker(myPoint); marker.setIcon(''/a/img/common/icon.png'', [32,32]); marker.setShadowIcon(''/a/img/common/icon-shadow.png'', [65,26]); mapstraction.addMarker(marker, true); Really appreciate any guidance, Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20101005/eb50d0bf/attachment.htm>
Hi Steve, welcome to the list. One question, are you using google or googlev3? I use googlev3 and do things the same as you do, all works well. The only difference I can see is that I pass marker.setIcon three params - marker.setIcon(icon.image,icon.iconSize,icon.iconAnchor); icon.iconAnchor is something like [50,50] perhaps you need an anchor? good luck, Ed 2010/10/5 Steve Kirtley <steve.kirtley at gmail.com>:> Hi, > New to the list - but hoping that someone can help. > I''ve recently used Mapstraction on a new website to show a simple Google map > with a custom marker / marker shadow. > All is working as expected in Firefox, and even IE. But in > Safari/Chrome/Webkit browsers the marker and shadowicon are both showing - > along with an extra shadow (believe it may be the default one). > Is this an issue anyone else has encountered? > Using the following code to create the marker: > var mapstraction = new mxn.Mapstraction(''themap'',''google''); > var myPoint = new mxn.LatLonPoint(latitude, longitude); > mapstraction.setCenterAndZoom(myPoint, 14); > var marker = new mxn.Marker(myPoint); > marker.setIcon(''/a/img/common/icon.png'', [32,32]); > marker.setShadowIcon(''/a/img/common/icon-shadow.png'', [65,26]); > mapstraction.addMarker(marker, true); > Really appreciate any guidance, > Thanks, > Steve > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >
Hi Ed, I was using v2 - but just switched to v3 and it solved the problem. Thanks for the tip. I''m so out of the loop with Google Maps (go through spells of not using it on sites) - are there any major disadvantages to v3, love that it no longer needs API keys... Thanks, Steve On Tue, Oct 5, 2010 at 6:10 PM, Ed Freyfogle <edf at sloan.mit.edu> wrote:> Hi Steve, > > welcome to the list. > > One question, are you using google or googlev3? > > I use googlev3 and do things the same as you do, all works well. The > only difference I can see is that I pass marker.setIcon three params - > > marker.setIcon(icon.image,icon.iconSize,icon.iconAnchor); > > icon.iconAnchor is something like [50,50] > > perhaps you need an anchor? > > good luck, > Ed > > > > > 2010/10/5 Steve Kirtley <steve.kirtley at gmail.com>: > > Hi, > > New to the list - but hoping that someone can help. > > I''ve recently used Mapstraction on a new website to show a simple Google > map > > with a custom marker / marker shadow. > > All is working as expected in Firefox, and even IE. But in > > Safari/Chrome/Webkit browsers the marker and shadowicon are both showing > - > > along with an extra shadow (believe it may be the default one). > > Is this an issue anyone else has encountered? > > Using the following code to create the marker: > > var mapstraction = new mxn.Mapstraction(''themap'',''google''); > > var myPoint = new mxn.LatLonPoint(latitude, longitude); > > mapstraction.setCenterAndZoom(myPoint, 14); > > var marker = new mxn.Marker(myPoint); > > marker.setIcon(''/a/img/common/icon.png'', [32,32]); > > marker.setShadowIcon(''/a/img/common/icon-shadow.png'', [65,26]); > > mapstraction.addMarker(marker, true); > > Really appreciate any guidance, > > Thanks, > > Steve > > _______________________________________________ > > Mapstraction mailing list > > Mapstraction at lists.mapstraction.com > > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20101005/b19bf6a0/attachment.htm>
2010/10/5 Steve Kirtley <steve.kirtley at gmail.com>:> Hi Ed, > I was using v2 - but just switched to v3 and it solved the problem. > Thanks for the tip. > I''m so out of the loop with Google Maps (go through spells of not using it > on sites) - are there any major disadvantages to v3, love that it no longernone. switched over a year ago and never looked back glad it worked for you, Ed> needs API keys... > Thanks, > Steve > > On Tue, Oct 5, 2010 at 6:10 PM, Ed Freyfogle <edf at sloan.mit.edu> wrote: >> >> Hi Steve, >> >> welcome to the list. >> >> One question, are you using google or googlev3? >> >> I use googlev3 and do things the same as you do, all works well. The >> only difference I can see is that I pass marker.setIcon three params - >> >> ? ?marker.setIcon(icon.image,icon.iconSize,icon.iconAnchor); >> >> icon.iconAnchor is something like [50,50] >> >> perhaps you need an anchor? >> >> good luck, >> Ed >> >> >> >> >> 2010/10/5 Steve Kirtley <steve.kirtley at gmail.com>: >> > Hi, >> > New to the list - but hoping that someone can help. >> > I''ve recently used Mapstraction on a new website to show a simple Google >> > map >> > with a custom marker / marker shadow. >> > All is working as expected in Firefox, and even IE. But in >> > Safari/Chrome/Webkit browsers the marker and shadowicon are both showing >> > - >> > along with an extra shadow (believe it may be the default one). >> > Is this an issue anyone else has encountered? >> > Using the following code to create the marker: >> > var mapstraction = new mxn.Mapstraction(''themap'',''google''); >> > var myPoint = new mxn.LatLonPoint(latitude, longitude); >> > mapstraction.setCenterAndZoom(myPoint, 14); >> > var marker = new mxn.Marker(myPoint); >> > marker.setIcon(''/a/img/common/icon.png'', [32,32]); >> > marker.setShadowIcon(''/a/img/common/icon-shadow.png'', [65,26]); >> > mapstraction.addMarker(marker, true); >> > Really appreciate any guidance, >> > Thanks, >> > Steve >> > _______________________________________________ >> > Mapstraction mailing list >> > Mapstraction at lists.mapstraction.com >> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > >> > >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >