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)

Using pictures as maps would be a great feature! dhe, 19 Oct 2009

I can only see the new feature Ability to define custom overlays for OpenLayers on the todo list. Does this mean own pictures as maps or is it something else? I am still looking forward to see this in Semantic Maps. --Danwe 17:55, 19 October 2009 (UTC)

Hey,

Have a look at the new features planned for Maps 0.5. Defining base layers is not something semantic, so it'll be part of Maps, not SM.

Cheers

-- Jeroen De Dauw 08:47, 20 October 2009 (UTC)

Ok, Thanks. But looks like it will come with 0.6, not 0.5 ;-) --Danwe 17:47, 26 October 2009 (UTC)

Hey,

Yes, I move it on release, since static maps do have priority.

Cheers

-- Jeroen De Dauw 08:41, 27 October 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::

Map with multiple pins = blank map with pins ???
When i try to show more than 1 pin on the map, the map gets always Grey and doesn't work on any inputs.

Code:


 * Its the same for google and openlayers.
 * We use always the newest versions of all extensions.
 * I noticed when i click one of the pins and zoom in an out again, then the Grey disappears an the map comes out. -- Could this be a problem with the auto zoom ?

-- Simon Bachenberg 22.09.2009

Hey,


 * Have you got the stable release, or the latest SVN trunk commit?
 * Can you provide a link to the malfunctioning maps?
 * Try changing the initial zoom of the map. When it's zoomed in to much, no tiles will be loaded in some cases, esp areas that have not been mapped in high res, like the sea.

Cheers

-- Jeroen De Dauw 19:06, 22 September 2009 (UTC)

Hey,

I checked my demo wiki, and no such error there. I then updated the code there to the latest SVN trunk commit, and still no sign of any gray map. So it must be something on your wiki going wrong I suspect. Maybe you have some special chars in one of the title's, or pop-up text?

Cheers

-- Jeroen De Dauw 19:13, 22 September 2009 (UTC)

Now have a look at it I got the newest Maps and Semanticmaps Package downloaded and installed. i hope this is the same as the SVN trunk.

-- Simon Bachenberg 8:42, 23 September 2009 (UTC+1)

Hey,

Please have a look at this section of Maps discussion. It's the same problem if I'm not mistaken. You also 'appear' to be missing your JS files, so like Yaron says there, you likely got your $wgScriptPath is configured.

Cheers

-- Jeroen De Dauw 08:16, 23 September 2009 (UTC)

Hi,

If i change the $wgScriptPath to "" the server redirects all incoming request to http://multiweb.gesis.org/ and not to my wiki at http://multiweb.gesis.org/wiki.

So if there where JS files missing which are missing ? I haven't deleted any ?

-- Simon Bachenberg 8:40, 24 September 2009 (UTC+1)

Hey,

Have a look at the html output, where the JS files are included. I believe the pointer is wrong, instead of actual files missing. FOr example this link:

http://socioguide-test/wiki/extensions/Maps/GoogleMaps/GoogleMapFunctions.js

$wgScriptPath seems correct, but that domain isn't.

Cheers

-- Jeroen De Dauw 12:12, 24 September 2009 (UTC)

What do I have to change now - Get a new google Api key?

We are using a virtual host. The real Domain-Name is Socioguide-Test, but if I generate an API Key for that Domain name you can't see maps form the Web.

Is it possible to have more than one API Key for Googlemaps ?

-- Simon Bachenberg 8:25, 25 September 2009 (UTC+1)

Hey,

This is not a problem with your API key (not in the first place anyway), but with the path of the JS files in your HTML output.

In Maps.php, you can find the following line:

$egMapsIncludePath 	= $wgServer. $egMapsScriptPath;

Try changing $wgServer to 'http://multiweb.gesis.org', and then do a similar replace in SemanticMaps.php. This should fix your problem. For the next release of both extensions I'll have a look at this issue with virtual hosts.

Cheers

-- Jeroen De Dauw 08:59, 25 September 2009 (UTC)

Hi, I tried that but it, didn't change anything. I also tried yahoo and openlayers they dont even show anything, if I have multiple pins. For one Pin they work great. Any new Idea how I could get multi pins working ?

Can you tell me which JS Files are wrong?

-- Simon Bachenberg 20:00, 27 September 2009 (UTC+1)

Hey,

This issue is not mapping-service related. Also, I'd expect the maps to fail no matter the number of markers on them. Can you link an example of a map with only one that's working?

I don't think there is anything wrong with you JS files. If you want to be sure, download the extensions again, and compare the JS files there with the ones on your server. When you replaced the $wgServer variable, what output did you get?

Cheers

-- Jeroen De Dauw 20:38, 27 September 2009 (UTC)

Hi,

I changed the $smgIncludePath back to normal. Then a Single Pin Map work with yahoo [Link] and only with Yahoo all others make grey maps.

If u want you can test it by your self, my wiki has no write permissions at the moment.

-- Simon Bachenberg 09.00, 28 September 2009 (UTC+1)

Hey,

I can't see (and can't get) anything working.

This line in the source output

http://socioguide-test/wiki/extensions/Maps/YahooMaps/YahooMapFunctions.js

should be

http://multiweb.gesis.org/wiki/extensions/Maps/YahooMaps/YahooMapFunctions.js

The amount of markers really does not affect this whatsoever. When you replaced the $wgServer variable, what output did you get?

Cheers --Jeroen De Dauw 10:19, 28 September 2009 (UTC)

Hi, have a look at http://multiweb.gesis.org/wiki/index.php/Arad the map is working right with Yahoo now.

Socioguide-Test   = Real Server multiweb.gesis.org = Virtual Server

When I change the Variables for $wgServer, this one Yahoo map stops working an all maps stay grey.

-- Simon Bachenberg 09.00, 29 September 2009 (UTC+1)

Hey,

The domain in your html output should then be your virtual server, like described in my above post. Changing the variable like I described should normally result in the correct output. Please provide the output you get when this is not the case, else I can't help you.

Cheers

--Jeroen De Dauw 17:40, 29 September 2009 (UTC)

Hi,

I changed it now have a look.

-- Simon Bachenberg 08:07, 1 October 2009 (UTC+1)

Hey,

That change fixed the issue with the reference to the JavaScript files. There is apperently another problem, whihc is causing the maps to malfunction when you have multiple markers. From what I've seen, I'd guess it's a wron,g setting or something similar. Did you change anything to the settings file of Maps or Semantic Maps?

Cheers

--Jeroen De Dauw 11:15, 1 October 2009 (UTC)

Hi, this is all config that we have for maps: require_once( "$IP/extensions/Maps/Maps.php" ); require_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" ); $egGoogleMapsKey = "ABQIAAAAxGRyrTpBgZK5vDZ2lrT-xhRHeL3PCqcMtv3wFxUrxYvHPewnghQjz-r_9HUSDAQR4DZ-U7_wAiSBxw"; $egYahooMapsKey = "kIYITb3V34HBALKpKdxJ9y4KE.6KTvxRoleNfxFO5NzDi6gk1Nmxm9JSA5d0oPDmb73Non3m";
 * 1) Semantic Maps http://www.mediawiki.org/wiki/Extension:Maps
 * 1) $egGoogleMapsKey = "ABQIAAAAxGRyrTpBgZK5vDZ2lrT-xhSxYyoZjA0LCsUB8u1taITp1hqhYRRKHU3GyGWeCGkL2nC315i22w-QWA"; // Internal Key

Maybe something is missing ?

-- Simon Bachenberg 15:02, 1 October 2009 (UTC+1)

Hey,

That seems to be fine. To be honest, I can't say what's going wrong exactly; the output seems fine, but still the mapping API's ain't accepting it. Some debugging will be required to pinpoint the problem.

Cheers

--Jeroen De Dauw 14:44, 1 October 2009 (UTC)

Hey,

Yaron suggested it's probably one of the extensions you are using that's conflicting with the mapping API's. You can easily check this by disabling all of them (the ones not required for Semantic Maps), and checking the relevant page again to see if the map gets displayed property. If it does not, the problem is something else, if it does get displayed however, you can re enable the extensions one by one, and so determine which one is causing the conflict.

Cheers

-- Jeroen De Dauw 15:25, 1 October 2009 (UTC)

Thanks for the Tip,

there where 2 Extensions that causes Problems:


 * LuceneSearch / UnifiedSearch
 * SMW Halo ( enabling the SMWHaloStore2 )


 * 1) SMW Halo

$wgUseAjax = true; include_once('extensions/SMWHalo/includes/SMW_Initialize.php'); $phpInterpreter = "$IP/../../php/php.exe";
 * 1) enableSMWHalo('SMWHaloStore2'); // Disable

// Disable
 * 1) Lucene Search
 * 2) Link: http://smwforum.ontoprise.com/smwforum/index.php/Help:Enabling_Lucene_Search
 * 3) $wgSearchType = 'LuceneSearch';
 * 4) $wgLuceneHost = 'socioguide-test';
 * 5) $wgLucenePort = 8123;
 * 6) $wgLuceneSearchVersion = 2.1;
 * 7) require_once("extensions/UnifiedSearch/includes/UnifiedSearch.php");

I contact the Halo Extension Guys for Help, looks like there Problem.

-- Simon Bachenberg 09:05, 2 October 2009 (UTC+1)

Ok. DOn't hesistate to bug me again when you encounter more Maps/SM related issues.

Cheers

-- Jeroen De Dauw 07:39, 2 October 2009 (UTC)

GPS coordinates are no Geographic Coordinates?
The parser function doesn't acknowledge that this is a correct input format: N 51° 09.167 E 004° 58.484 When I use it unaltered together with or  then it works, however. I just can't get to accept it and thus I can't save it as geographic data for SMW. Thus I am unable to build queries with Semantic Maps that display the pages on a map. How come that these GPS coordinates are not valid inputs for and how can I fix this?

Hey,

Thanks for pointing this out. I'll try to have a look at this issue later today and get back to you.

Cheers

-- Jeroen De Dauw 05:27, 6 October 2009 (UTC)

GPS coördinates are read wrong from semantic wiki
Whenever I request coördinates via an #ask the mark ends up 30-40 kilometers on the wrong place.

First I get the coördinates and save them to a variable:

Then I use that variable to show it in a map:

But the mark is completely wrong. When I enter the coördinates directly, in a decimal way, it works. But semantic mediawiki returns coördinates in an houres-minutes way. I had the same problem with the obsolete google maps extension, but that only moved the marker about 2 kilometers.

-- Skerit 22:58, 18 October 2009 (UTC)

Hey,

What version of SM (and Maps) are you using? Can you also link to a page where I can see this flawed behaviour? And again, which extension are you referring to with 'the obsolete google maps'?

Cheers

-- Jeroen De Dauw 11:15, 19 October 2009 (UTC)

Ask queries don't work
Insert non-formatted text here Hello, I have some troubles using ask queries, I have used the same as in all the examples, even copied the same template and used the same Category for test. If I change the format to broadtable, I get the coordinates displayed, so I know that the ask query is fine. The map is also displayed correctly for the induvidual location, so I know that the coordinates are correct and that the map feature is working.

Here is my ask query, it's done in a normal page:

I took the liberty to create the same query in the demo page, and it works. Is there any changes I need to enable ask queries?

--

Hey,

Which version of SM are you using? If you got the last commit from SVN trunk, the mapping service aliases won't work. If so, simply change format=googlemap to format=googlemaps.

What output are you getting? A table, a map with nothing on it, blank space, ... ?

Are you sure the coordinates property is of type geographical location?

And last question: can you link to the page on which the problems manifest themselves?

Cheers

-- Jeroen De Dauw 11:20, 19 October 2009 (UTC)

I will try to get an online version during the day. I'm using the latest version, and have tested with both googlemap, googlemaps and just map.

The output is nothing, no blank map..

The cordinates work on the map for the induvidual location, so I think they are fine. (But that is a display view, not an ask)

I'll send the link back to you later today

Hey,

Can you please specify which version you are using (= version number)? 'the latest version' can refer to multiple things.

Cheers

-- Jeroen De Dauw 15:13, 19 October 2009 (UTC)

Hello again Jeroen,

Thanks for all your help so far, appresiate you taking the time.

My versions are: MediaWiki: 1.15.1 SemanticMaps: 0.3.4

Hey,

Can you provide a link to your wiki (preferably a page on which the problem you are having manifests itself), so I can have a look at what exactly is going wrong? You can send me an email with the link if you do not wish to reveal your wiki/page publicly for some reason.

Cheers

-- Jeroen De Dauw

The link is http://194.19.110.207, search for Location 2. This is a wiki setup from scratch on a CentOS 5.0 server

NOTE: There is a problem with the DNS on this server, so the Google API wont work, but it work internally (since we use another FQDN from the inside). AND: It should have displayed the error message on the Category:Locations page, since this is where I do the ask query

Hey,

Like I originally suspected, the type of your coordinate property is wrong. It should be Geographical Coordinate, and not Page. Maps won't have problems with this, since it's not integrated with SMW, but SM obviously is. See this page on your wiki for proof.

Cheers

-- Jeroen De Dauw 17:03, 20 October 2009 (UTC)

You were absolutely correct Jeroen, It's working now! Thanks a lot for you help and effort.

Have a great day

Tor