Hi,
today I have read that Tourweaver from Easypano is now also supporting Bing Maps:
http://easypano.com/forum/display_…&PagePosition=1
I was a bit surprised that they got it that fast (not typically I would say ;-)) because there were some special things to be respected when using Bing Maps with OpenScales. Especially the coordinate and zoom translating to be compatible with Google Maps was not an easy part.
So I have downloaded their version and looked into their swf by using the Sothink SWF Decompiler...
...AND THAN I WAS SHOCKED:
More than 99% of the Bing/OpenScales related code was directly stolen/copied from the krpano Bing Maps Plugin!!!!
Even the simple code and the graphics for the controls, which were plain simple and every Flash developer normally should be able to do himself was copied!
Here a code comparison - a small part of original krpano Bing Maps Plugin code:
And here the copy from Easypano:
Why is that part special?
The OpenScales API that was used in the krpano Bing Maps Plugin uses internally 'Resolutions' as format for the map zoom and the Goolge Maps API directly the zoom levels as number itself. So to be compatible to the Google Maps API it is necessary to convert the Google Maps zoom level to the OpenScales 'Resolution'.
In the Bing.as file from the OpenScales sources there is a mapping table for that. It is a row of values with these numbers (shortened here for display): 156543, 78271, 39135, 19567, 4891, 2445, 1222, 611, 305, 152, 76, 38, 19, 9, 4.7, 2.38, 1.19, 0.59, 0.29, 0.14, 0.07
This are the resolution values for 22 zoom levels, but in the krpano Bing Maps Plugin I wanted to be able to interpolate between zoom levels and also go/zoom beyond level 22, so the values between these steps and above were necessary. So I have analyzed that row of values and found this formula for calculating the resolution directly from any zoom level: resolution = 10^((22 - 4,74380021493083 - zoomlevel)*LOG(4)/2) .
Finding that formula was not that easy and I was pretty sure that no one other would be that detailed and do this (every 'normal' coder would use the given mapping array) - so this was the first that I was looking for and was very surprised to see the same code also in the Easypano code. But then was looking further - also all the other code is almost identically, even the function and classes have still their original names!!!
I have extracted here some decompiled code lines from both plugins for comparisons (99% identically) - fell free to download and compare yourself:
https://krpano.com/temp/easypano/bingmaps_original.as
https://krpano.com/temp/easypano/bingmaps_stolen.as
Everyone with a Flash decompiler tool can do the same by opening and comparing the krpano bingmaps.swf and the Easypano TWViewerp_b.swf files.
...
That's absolutely not okay from Easypano!
I have worked very hard for that code and they have just simply copied it!
What to do with such company in such case?!
Any tips or experiences?
Best regards,
Klaus