04 Jul 2009 @ 3:10 PM 

Last 2 days I continued working on the query printers of Semantic Maps. I started of with creating a new abstract class, called SMMapPrinter, which inherits from SMWResultPrinter, and contains the common code of all QP’s in SM. It has one protected field, $m_locations, which obviously is an array holding all locations, and 3 functions. One public abstract getName(), one public getResult, and one protected getResultText. The last function does the work of putting all the locations into the $m_locations field, and so allows me to omit this in every QP inheriting from this class. Another small thing this function does is setting the default map parameters, using MapsUtils::setDefaultParValues.

Semantic Maps showing a Yahoo! Map with queried coordinates

Map code: {{#ask:[[Category:Locations]]|?Has coordinates|format=yahoomap|width=610|height=500}}

After this was done I adapted the Google Maps QP to work with it, and started work on the Yahoo Maps query printer. I did some reading in the Yahoo! Maps documentation on how to exactly place markers that allow the display of a text balloon after being clicked, which are called ‘smart markers’ in the Yahoo! Maps API. I got everything working (displaying all markers, the balloons and links in them and the map properties), except the automatic centre and zoom of the map to display all coordinates. I’ve got the code for this, it’s isn’t giving any errors, but for some reason isn’t working either. The map just centres on the first coordinate. I’m going to have another look at this tomorrow, but if I can’t find it, I’ll just start with implementing Google Earth or Open Layers in Maps.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 19 Jul 2009 @ 12:23 PM

EmailPermalink
Tags


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 1293
  • Posts/Pages » 169
  • Comments » 119
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.