pamela fox
2008-Dec-07 09:09 UTC
[Mapstraction] Open Mapping API slides, mapstraction hacking, feedback
For OSDC (Open Source Developer''s Conference), we ran a Google hackathon. One of the topics we covered was open mapping APIs, where I gave a short talk and then we did a few hours of Mapstraction hacking. The slides for the talk are here: http://www.slideshare.net/wuzziwug/open-maps-or-close-enough-presentation/ For the hacking, I gave attendees the following suggestions: - Structured: - http://wholemap.com/blog/mapstraction-tutorial - http://wholemap.com/blog/mapstraction-tutorial2 - http://wholemap.com/blog/mapstraction-tutorial3 - Less Structured: Mappy Brain Age! - Use bits of code from the original Brain Age app when creating this one (the social bits are largely the same). - Load the Mapstraction API + Google API into the app (Hint: script append, script onload) - Initialize the map to the world view. - Instead of asking random math questions, ask the user to locate random places in the world (see Appendix for sample JSON). - Award them a correct answer if they''re within a particular distance threshold. - Sample Solution<http://osda.appspot.com/code/sample/agRvc2RhchELEgpDb2RlU2FtcGxlGMkYDA> Most people did the first option. The guy who did the second option ran into issues with Polygon. In this function: var gpoints = []; for (var i = 0, length = this.points.length ; i< length; i++){ gpoints.push(this.points[i].toGoogle()); } if (this.closed || this.gpoints[0].equals(this.gpoints[length-1])) { this.gpoints should be simply gpoints There were also various questions about how to put an event listener on the map - it took me a while inspecting the code to figure it out myself. That might be made clearer in an example or the reference. On that note, the reference is a bit hard to navigate. I''m probably biased from my experience with Google Maps API, but if anyone was interested, you can try generating 1-page Google-style docs. We have some scripts for doing that in our open source lib: http://code.google.com/p/gmaps-utility-library-dev/source/browse/#svn/trunk/util/docs/template%3Fstate%3Dclosed Perhaps this info is useful to others who might run Mapstraction hackathons/codelabs. - pamela -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20081207/d8f00bd2/attachment.htm>
Andrew Turner
2009-Jan-24 20:09 UTC
[Mapstraction] Open Mapping API slides, mapstraction hacking, feedback
Thanks Pamela - finally getting to this. we''ll put up these examples on the Mapstraction News blog and resources. How do you run the publish.js to generate docs? On Dec 7, 2008, at 4:09 AM, pamela fox wrote:> For OSDC (Open Source Developer''s Conference), we ran a Google > hackathon. > > One of the topics we covered was open mapping APIs, where I gave a > short talk and then we did a few hours of Mapstraction hacking. > > The slides for the talk are here: > http://www.slideshare.net/wuzziwug/open-maps-or-close-enough-presentation/ > > For the hacking, I gave attendees the following suggestions: > Structured: > http://wholemap.com/blog/mapstraction-tutorial > http://wholemap.com/blog/mapstraction-tutorial2 > http://wholemap.com/blog/mapstraction-tutorial3 > Less Structured: Mappy Brain Age! > Use bits of code from the original Brain Age app when creating this > one (the social bits are largely the same). > Load the Mapstraction API + Google API into the app (Hint: script > append, script onload) > Initialize the map to the world view. > Instead of asking random math questions, ask the user to locate > random places in the world (see Appendix for sample JSON). > Award them a correct answer if they''re within a particular distance > threshold. > Sample Solution > > Most people did the first option. The guy who did the second option > ran into issues with Polygon. > > In this function: > var gpoints = []; > for (var i = 0, length = this.points.length ; i< length; i++){ > gpoints.push(this.points[i].toGoogle()); > } > if (this.closed || > this.gpoints[0].equals(this.gpoints[length-1])) { > this.gpoints should be simply gpoints > > There were also various questions about how to put an event listener > on the map - it took me a while inspecting the code to figure it out > myself. That might be made clearer in an example or the reference. > > On that note, the reference is a bit hard to navigate. I''m probably > biased from my experience with Google Maps API, but if anyone was > interested, you can try generating 1-page Google-style docs. We have > some scripts for doing that in our open source lib: > http://code.google.com/p/gmaps-utility-library-dev/source/browse/ > #svn/trunk/util/docs/template%3Fstate%3Dclosed > > Perhaps this info is useful to others who might run Mapstraction > hackathons/codelabs. > > - pamela > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com-- Andrew Turner mobile: 248.982.3609 email: andrew at highearthorbit.com blog: http://highearthorbit.com -- Helping build the Geospatial Web -- http://geocommons.com --- http://mapufacture.com Introduction to Neogeography - http://oreilly.com/catalog/neogeography -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090124/fffdcfd0/attachment-0001.htm>
pamela fox
2009-Jan-25 00:38 UTC
[Mapstraction] Open Mapping API slides, mapstraction hacking, feedback
Hey Andrew- To run it, first make sure you''ve got jsdoc-toolkit checked out as well. We have it as an svn:externals property, so it gets auto checked out along with everything else, but from a separate repository. Our external looks like this: jsdoc-toolkit -r638 http://jsdoc-toolkit.googlecode.com/svn/trunk/jsdoc-toolkit Then we generate the docs using an ant script (ant all-docs). That corresponds to this: <target name="all-docs"> <foreach param="LIBLOC" target="docs"> <path> <dirset dir="${basedir}" includes="*" excludes="util"/> </path> </foreach> </target> <target name="docs" description="Generates reference documentation."> <fileset id="LIBRARY" dir="${LIBLOC}" includes="src/*.js" excludes="src/*_packed.js"/> <property name="LIBRARY" refid="LIBRARY"></property> <java failonerror="true" jar="${basedir}/util/docs/jsdoc-toolkit/jsrun.jar" fork="true"> <arg value="${basedir}/util/docs/jsdoc-toolkit/app/run.js"/> <arg value="--allfunctions"/> <arg value="--verbose"/> <arg value="--suppress"/> <arg value="--template=${basedir}/util/docs/template/"/> <arg value="--directory=${LIBLOC}/docs/"/> <arg value="${LIBLOC}/${LIBRARY}"/> </java> </target> So if you didn''t want to run it via an ant script, you could just run it using jsrun.jar and the commands that are passed in (<arg value>). Let me know if you need more info. - pamela On Sun, Jan 25, 2009 at 7:09 AM, Andrew Turner <andrew at highearthorbit.com> wrote:> Thanks Pamela - finally getting to this. we''ll put up these examples on the > Mapstraction News blog and resources. > How do you run the publish.js to generate docs? > On Dec 7, 2008, at 4:09 AM, pamela fox wrote: > > For OSDC (Open Source Developer''s Conference), we ran a Google hackathon. > One of the topics we covered was open mapping APIs, where I gave a short > talk and then we did a few hours of Mapstraction hacking. > The slides for the talk are here: > http://www.slideshare.net/wuzziwug/open-maps-or-close-enough-presentation/ > > For the hacking, I gave attendees the following suggestions: > > Structured: > > http://wholemap.com/blog/mapstraction-tutorial > http://wholemap.com/blog/mapstraction-tutorial2 > http://wholemap.com/blog/mapstraction-tutorial3 > > Less Structured: Mappy Brain Age! > > Use bits of code from the original Brain Age app when creating this one (the > social bits are largely the same). > Load the Mapstraction API + Google API into the app (Hint: script append, > script onload) > Initialize the map to the world view. > Instead of asking random math questions, ask the user to locate random > places in the world (see Appendix for sample JSON). > Award them a correct answer if they''re within a particular distance > threshold. > Sample Solution > > Most people did the first option. The guy who did the second option ran into > issues with Polygon. > In this function: > > var gpoints = []; > for (var i = 0, length = this.points.length ; i< length; i++){ > gpoints.push(this.points[i].toGoogle()); > } > if (this.closed || this.gpoints[0].equals(this.gpoints[length-1])) { > > this.gpoints should be simply gpoints > There were also various questions about how to put an event listener on the > map - it took me a while inspecting the code to figure it out myself. That > might be made clearer in an example or the reference. > > On that note, the reference is a bit hard to navigate. I''m probably biased > from my experience with Google Maps API, but if anyone was interested, you > can try generating 1-page Google-style docs. We have some scripts for doing > that in our open source lib: > http://code.google.com/p/gmaps-utility-library-dev/source/browse/#svn/trunk/util/docs/template%3Fstate%3Dclosed > Perhaps this info is useful to others who might run Mapstraction > hackathons/codelabs. > - pamela > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > -- > Andrew Turner > mobile: 248.982.3609 > email: andrew at highearthorbit.com > blog: http://highearthorbit.com > -- Helping build the Geospatial Web -- > http://geocommons.com --- http://mapufacture.com > Introduction to Neogeography - http://oreilly.com/catalog/neogeography >