Hi, My name is Jeroen Roos and I am the maintainer of Zoph (http://www.zoph.org). Zoph is a photo-management application built in PHP. I am currently working on integrating Mapstraction into Zoph and I ran into a small issue: I use custom marker icons that I created from the BC Tango KDE iconset. I have adapted the size of these icons to the size Googlemaps requires (20x34) and this looks good in Googlemaps and Openstreetmap. However, when I switch to Yahoo, the image looks distorted, because Yahoo requires a 30x33 image... (I have not yet tested any other mapping providers, because Zoph currently only supports these 3). I think Mapstraction should ''abstract'' this too. Any ideas? Thanks, Jeroen PS. I have created a small picture that demonstrates the issue, you can see it on http://roosnet.mine.nu/yahoo-google-icons.png
On Wed, Jun 18, 2008 at 3:49 PM, Jeroen Roos <mapstraction at zoph.org> wrote:> Hi, > > My name is Jeroen Roos and I am the maintainer of Zoph > (http://www.zoph.org). Zoph is a photo-management application built in PHP. > > I am currently working on integrating Mapstraction into Zoph and I ran into > a small issue: I use custom marker icons that I created from the BC Tango > KDE iconset. I have adapted the size of these icons to the size Googlemaps > requires (20x34) and this looks good in Googlemaps and Openstreetmap. > However, when I switch to Yahoo, the image looks distorted, because Yahoo > requires a 30x33 image... (I have not yet tested any other mapping > providers, because Zoph currently only supports these 3). > I think Mapstraction should ''abstract'' this too.Mapstraction can set icon sizes. map.addMarkerWithData(new Marker(new LatLonPoint(51.520832, -0.140133)), {icon : "markers/yourmarker.png", iconSize : [20,34] }); So you can really use an icon of any size (and don''t have to optimize for a particular provider''s icon size).> > Any ideas? > > Thanks, > Jeroen > > PS. I have created a small picture that demonstrates the issue, you can see > it on http://roosnet.mine.nu/yahoo-google-icons.png > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-- Andrew Turner mobile: 248.982.3609 andrew at mapufacture.com http://highearthorbit.com http://mapufacture.com Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography
I can''t see this method in the doc; it looks like the doc was last generated over a year ago... perhaps it would be worth regenerating so that we can have doc for the most up-to-date Mapstraction? Andrew Turner wrote:> On Wed, Jun 18, 2008 at 3:49 PM, Jeroen Roos <mapstraction at zoph.org> wrote: >> Hi, >> >> My name is Jeroen Roos and I am the maintainer of Zoph >> (http://www.zoph.org). Zoph is a photo-management application built in PHP. >> >> I am currently working on integrating Mapstraction into Zoph and I ran into >> a small issue: I use custom marker icons that I created from the BC Tango >> KDE iconset. I have adapted the size of these icons to the size Googlemaps >> requires (20x34) and this looks good in Googlemaps and Openstreetmap. >> However, when I switch to Yahoo, the image looks distorted, because Yahoo >> requires a 30x33 image... (I have not yet tested any other mapping >> providers, because Zoph currently only supports these 3). >> I think Mapstraction should ''abstract'' this too. > > Mapstraction can set icon sizes. > > map.addMarkerWithData(new Marker(new LatLonPoint(51.520832, > -0.140133)), {icon : "markers/yourmarker.png", > iconSize : [20,34] }); > > So you can really use an icon of any size (and don''t have to optimize > for a particular provider''s icon size). > > >> Any ideas? >> >> Thanks, >> Jeroen >> >> PS. I have created a small picture that demonstrates the issue, you can see >> it on http://roosnet.mine.nu/yahoo-google-icons.png >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > > >
Good point! The docs are quite out of date, should setup SVN triggers to regen docs & minimized JS on checkin. On Thu, Jun 19, 2008 at 3:08 AM, Turner, Andy <a.turner06 at imperial.ac.uk> wrote:> I can''t see this method in the doc; it looks like the doc was last generated > over a year ago... perhaps it would be worth regenerating so that we can > have doc for the most up-to-date Mapstraction? > > > Andrew Turner wrote: >> >> On Wed, Jun 18, 2008 at 3:49 PM, Jeroen Roos <mapstraction at zoph.org> >> wrote: >>> >>> Hi, >>> >>> My name is Jeroen Roos and I am the maintainer of Zoph >>> (http://www.zoph.org). Zoph is a photo-management application built in >>> PHP. >>> >>> I am currently working on integrating Mapstraction into Zoph and I ran >>> into >>> a small issue: I use custom marker icons that I created from the BC Tango >>> KDE iconset. I have adapted the size of these icons to the size >>> Googlemaps >>> requires (20x34) and this looks good in Googlemaps and Openstreetmap. >>> However, when I switch to Yahoo, the image looks distorted, because Yahoo >>> requires a 30x33 image... (I have not yet tested any other mapping >>> providers, because Zoph currently only supports these 3). >>> I think Mapstraction should ''abstract'' this too. >> >> Mapstraction can set icon sizes. >> >> map.addMarkerWithData(new Marker(new LatLonPoint(51.520832, >> -0.140133)), {icon : "markers/yourmarker.png", >> iconSize : [20,34] }); >> >> So you can really use an icon of any size (and don''t have to optimize >> for a particular provider''s icon size). >> >> >>> Any ideas? >>> >>> Thanks, >>> Jeroen >>> >>> PS. I have created a small picture that demonstrates the issue, you can >>> see >>> it on http://roosnet.mine.nu/yahoo-google-icons.png >>> _______________________________________________ >>> Mapstraction mailing list >>> Mapstraction at lists.mapstraction.com >>> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >>> >> >> >> > >-- Andrew Turner mobile: 248.982.3609 andrew at mapufacture.com http://highearthorbit.com http://mapufacture.com Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography
On Wednesday 18 June 2008 21:58:01 Andrew Turner wrote:> Mapstraction can set icon sizes. > > map.addMarkerWithData(new Marker(new LatLonPoint(51.520832, > -0.140133)), {icon : "markers/yourmarker.png", > iconSize : [20,34] });Thanks for your answer. I am actually using marker.addIcon and by reading the sourcecode I figured out that this should work too: marker.setIcon(''markers/yourmarker.png'', [20,34]); And indeed, this works fine for Google (tested by setting it to 50,50) but for Yahoo this doesn''t work. This is caused by the fact that mapstraction calls new YMarker without specifying the size and setting the size later on with ''ymarker.size=''. However, changing the size later on doesn''t work, this is either a bug in the Yahoo api or one should call a function that actually propagates this change or something, unfortunately Yahoo''s sourcecode is (just as Google''s BTW) obfuscated and therefore unreadable, so I have not been able to figure out. However, I have created a patch for mapstraction that fixes/workarounds this. Jeroen -------------- next part -------------- A non-text attachment was scrubbed... Name: Yahoosize.patch Type: text/x-diff Size: 787 bytes Desc: not available URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20080623/93b8e3a6/attachment.patch>
Thanks for the patch. I fixed it to handle when there is an iconUrl but no iconSize. It will be checked in shortly Andrew On Mon, Jun 23, 2008 at 8:35 AM, Jeroen Roos <mapstraction at zoph.org> wrote:> On Wednesday 18 June 2008 21:58:01 Andrew Turner wrote: >> Mapstraction can set icon sizes. >> >> map.addMarkerWithData(new Marker(new LatLonPoint(51.520832, >> -0.140133)), {icon : "markers/yourmarker.png", >> iconSize : [20,34] }); > > Thanks for your answer. I am actually using marker.addIcon and by reading the > sourcecode I figured out that this should work too: > > marker.setIcon(''markers/yourmarker.png'', [20,34]); > > And indeed, this works fine for Google (tested by setting it to 50,50) but for > Yahoo this doesn''t work. > > This is caused by the fact that mapstraction calls new YMarker without > specifying the size and setting the size later on with ''ymarker.size=''. > > However, changing the size later on doesn''t work, this is either a bug in the > Yahoo api or one should call a function that actually propagates this change > or something, unfortunately Yahoo''s sourcecode is (just as Google''s BTW) > obfuscated and therefore unreadable, so I have not been able to figure out. > > However, I have created a patch for mapstraction that fixes/workarounds this. > > Jeroen > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Andrew Turner mobile: 248.982.3609 andrew at mapufacture.com http://highearthorbit.com http://mapufacture.com Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography