Extension talk:Semantic Maps/LQT Archive 1

Pictures as Maps?
I miss the feature of Semantic Layers 0.4 which was to define a jpg or png picture as map for example for video game walkthroughs as it was here: http://s89238293.onlinehome.us/w/index.php?title=Charon_doesn%27t_make_change

Is there also a upcomming demo wiki planed like the one of Semantic Layers? --Danwe 21:57, 22 July 2009 (UTC)

This functionality is indeed not yet present. It's however, on the to-do list. If you have any comments on that, please place them there.

There is a demo wiki, which is linked to multiple times in the Semantic Maps article. - Jeroen De Dauw 23:31, 22 July 2009 (UTC)

Blank Map?
Sorry newbie question. I'm new to semantic wiki and maps extension. I have set my geographic coordinates property (Property:Coordinates) on my category "Companies" and it looks to be set properly. Like so

I make the #ask query as so:

The extension tries to display a map (the controls and 'powered by Google' logo), but there are none of the map image tiles and no pin for the company.

No error messages in the log file. Not sure if there is any logging?

BTW, this is a totally cool extension!

--

Hey, your query is not returning any coordinate results. No map should be displayed - but the empty map is a bug in 0.2. This has been fixed in the soon comming version 0.3. The easiest way to see what kind of results you are getting is to put 'table' as format. I suggest you do that, and try to get the query right. After that you should not have any problems using Maps/Semantic Maps.

--Jeroen De Dauw 10:05, 13 August 2009 (UTC)

Hi Jeroen, you're right. There was just something whacked with my query results. I got that squared away and it works great!

I do have a new problem now though. I notice that some existing queries with format=ol are trying to display as maps. They have the same behavior as the failed query. They display a blank map (specifically a yahoomap).

This is causing problems for all my existing queries using format=ol. It looks to be specific to that format. If I add ?Coordinates to the query, it will display the full map correctly, but it shouldn't be trying to display a map at all unless format=map.

Wondering if you had seen or was aware of this bug. BTW, I tested it in 0.3 and it still happens there.

--GregZ 21:02, 13 August 2009 (UTC)

format=ol
Hi Jeroen,

I have uncovered the bug that I mentioned above regarding format=ol. This is a problem in 0.2.

format=ol should map to SMWListResultPrinter, but there is alias being set in Maps.php which will set it to SMOpenLayers

It looks like this has been fixed in 0.3, but there are still some other problems that are going on with 0.3, so I've just patched 0.2 for now.

Good luck and let me know when 0.3 is ready to give a spin.

Thanks! GregZ --GregZ 22:43, 13 August 2009 (UTC)

Hey GregZ,

The bug was fixed in 0.2.1, so you should be able to use 0.2.2 without any problems.

0.3 will be released later today. I'm still bug hunting it, but if you found any issues, feel free to report them. It's always a pain when I hear of them AFTER the release :)

Cheers

--Jeroen De Dauw 22:50, 13 August 2009 (UTC)

Some note I'd like to add: quite some of the wiki syntaxis for 0.3 changed, so it's logical it'll give errors if you use 0.2 or 0.1 like wiki code. The docs will be updated before the 0.3 downloads are put on-line. Some of the changes are discussed in the last 3 posts here.

Cheers

--Jeroen De Dauw 22:58, 13 August 2009 (UTC)

0.3 has been added to the downloads, and the docs have been updated. I suppose your issue has been resolved now?

Cheers

-- Jeroen De Dauw 01:35, 16 August 2009 (UTC)

Aliases?
Hi,

I've got the following problem: Warning: Invalid argument supplied for foreach in [path]/extensions/SemanticMaps/SemanticMaps.php on line 89

In SemanticMaps.php you have 90                foreach ($serviceData['aliases'] as $alias) {

however, if I dump $serviceData, there's no aliases key: array(2) { ["qp"]=> array(3) { ["class"]=> string(12) "SMGoogleMaps" ["file"]=> string(28) "GoogleMaps/SM_GoogleMaps.php" ["local"]=> bool(true) } ["fi"]=> array(3) { ["class"]=> string(21) "SMGoogleMapsFormInput" ["file"]=> string(37) "GoogleMaps/SM_GoogleMapsFormInput.php" ["local"]=> bool(true) } } Where is the aliases supposed to come from?

I'm using the ask syntax and upgrading from SemanticGoogleMaps

using SMaps and Maps REL 0.3.2 --Kwisatz 18:08, 21 August 2009 (UTC)

Hey,

I saw you removed this from the talk page. Has your problem been resolved? If so, maybe you could give some brief explanation so other people don't get stuck with a similar problem. Also, if any of the docs are unclear or confusing about something, please say so, and I'll have a look at them :)

Cheers

--Jeroen De Dauw 10:36, 22 August 2009 (UTC)

Error trying to bring up map with multiple pins
Getting this error:

Fatal error: Class name must be a valid object or a string in /var/lib/mediawiki/extensions/SemanticMaps/SM_Mapper.php on line 28

with this markup:

Any idea whats going wrong here? Any ideas what I need to fix?

--Jeff Waltzer

Hey,

That sounds like a bug from 0.3, which was solved in 0.3.1 (see here). If you are still using 0.3, I suggest you upgrade as soon as possible to the latest version, 0.3.3.

Cheers --Jeroen De Dauw 11:27, 27 August 2009 (UTC)

Show a simple map for an article
I'm using Semantic Forms and the form input for the map is working nicely. I can show overview maps that link to the articles really well. However I'm lost on how I show a simple map on the article page itself. I know this is probably trival but a point in the right direction would be invaluable. Currently it is showing a coordinate field, if I try to use this as the input for the maps extension it fails as the content is the wrong format (markup, wrong coordinate format). In desperation I tried to write a parser function to strip and convert this, which worked but then this in turn broke the form.

Hey,

I'm not sure I understand you correctly. You can use display_point(s) to display coordinates. Coordinates entered in a form should be valid here. You can see an implementation here. Or one at my demo wiki.

Cheers!

--Jeroen De Dauw 11:46, 11 September 2009 (UTC)

Perfect, thanks Jeroen that works perfectly. For anyone else having the same issue the solution is to use something like this in your template:

Coordinates::