I wanted to start by saying I can see you are irritated and there is more that Google could do to make this API a little easier to use. However for a Free or minimal cost they do offer this and a ton of free products that most would be charging for. You can use the API reference and the turtorials to get almost all the info that you need.
The APi Reference has all the constructors and what the arguments are. When you are seeing arg1, arg2 I think that is flash builder not passing the info along but I could be wrong. Everything you are looking for gets shiped along with the SDK or is online. I am not to sure about the sandbox violation but I don't think that is an API problem. Maybe you can be more clear and we could help you. I also don't know about the vector based rendering you are talking about, but with the tiles I don't see how that would be better. Drawing the much vector artwork would probably crash flash player and the CPU doing all that math on fast pan and scans would be slow I think. To limit the max attitudes maybe you can override the maxPitch and so on by extending the ICamera interface in a super class. Or, I would use the MapAttitudeEvent - ATTITUDE_CHANGE_STEP and make sure you set the cancellable attribute to true. Or if that doesn't work hack it by using the other events to check the current positions and return the attitudes back to the limit when the finished moving. I think you can just check what the current control position is or the current attitude is and if it is more than your max cancel the move and than call flyTo() and give it the limited Attitude object - Attitude(yaw, picth, roll). There could be a better way but this was the first thought I wrote real fast to get you started. If I have time i will actually try it to see if it works. On Sun, Aug 28, 2011 at 8:33 PM, Simon O'Connor <[email protected]> wrote: > I have returned to using the Google Maps Flash API and have been > reminded just how insanely annoying it is to use. > > * Nothing has code based documentation, so you get no information > within the Flash Builder interface. This is just good coding practice. > * Arguments have names that give no hint as to what they are, just > arg1, arg2 etc. > * With no released source we can't investigate how things work when we > end up discovering the holes in the documentation. > * Things that have been brought up for years have had no action > (Security sandbox violation for pretty much anything done over a map > anyone?) > * The javascript api moves forward and gets vector based rendering > while the flash side is left with image tiles. > * No indication of the future of this api > > Real world example where all of this has come together to really > frustrate me? Sure: > > I have a google map inside a Flex app. We have an enterprise licence > for this, and so am already offside for the security sandbox violation > messages filling my console window while debugging. > > On this map I lay down polygons representing postcodes. I do this with > google's encoded polyline interface because it's what we started using > for performance reasons in the html version before things got faster > there. > > Well, that and there has been no indication of whether the Flash > interface is heading the same was as the javascript API and phasing > this out in favour of large lists of points. > > So, all ok so far. > > Then I overlay Papervision3D columns onto these polygons to represent > data. All ok still. > > Now I want to limit how much a user can change the attitude (pitch/yaw/ > roll) of the camera. Oh, cool, camera has maxPitch, maxYaw, maxRoll > attributes. I'll just set these. > > No I won't, they're read only. > > Ok, surely they can be set via a function? Hmmm, can't find any. > > What about initOptions? Nope, not mentioned there either. > > Can I intercept the ATTITUDE_CHANGE_STEP event and handle it myself? > No, that doesn't seem to work either. > > I'll just control click into the Map3D class or the Camera class and > see how I'm supposed to handle this... nope, can't do that, no source. > > So, I'm left with a map which I'm SURE I should be able to limit the > movement of, but with no way of ascertaining how I'm supposed to. All > of this in an aging API that we have been given no indication of > whether it's going to be supported any further. This sort of thing > happens time and time again. Either the code documentation needs to be > seriously updated or the source should be released so we can actually > use it properly. > > > > I tells yah, it's enough to push me over to Yahoo or OpenStreetMaps > or... heaven forbid Bing maps > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps API For Flash" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-maps-api-for-flash?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en.
