Extension talk:Semantic Maps
Contents
What I am trying to do is to have the ability for someone to type an address and display all the nearby destinations. It is possible to do this but there's no way to display a point for the address someone entered. At most I can set that address as the center of the map, but showing a point would make a difference.
With display_point in maps I can do one but I can't display a point of my choosing plus nearby destinations via ask query. 67.170.217.247 01:25, 3 October 2010 (UTC)
The distance query currently does not support this. It is however a good idea, so I'll put it on to the to-do list.
I have added a parameter that allows you to specify static points (like with the display_points parser function) in addition to query results in queries. It'll be in the next release, which will be 0.7.
You can already try it out with beta 3. get it.
I installed all the necessary components for Semantic Maps. However, now whenever any page gets edited, regardless of whether it's map related, i get the following error:
- A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "SMW::deleteSemanticData". Database returned error "1146: Table 'outward_wiki.w1_sm_coords' doesn't exist (localhost)".
I can't find any .sql upgrade information. Anybody have an idea how to solve this?
See "Installing 0.6 and above" in the installation instructions.
Hi,
I've setup (several times) a new installation of mediawiki with Semantic Bundle extension in Spanish Language but I am unable to work with geographics coordinates.
With a clean installation I follow these steps:
1. Create a new property called 'TieneCoordenadas' based on Geographic coordinates type. 2. Create a new template 'TestPlace' with a new category 'TestPlaces' 3. Create a new form based on template TestPlace 4. Create a new page based on this form 5. Browse properies for this page shows: has improper value for 'TieneCoordenadas' property
How I fixed it:
- Change Language configuration in LocalSettings.php and to 'en' - Go to special pages, create a new property based on Geographic Coordinates - Create new templates and forms and use this new property - Voila! It works, but I still don't understand why wasn't working before in spanish. is it a bug?
I've worked with Mediawiki only for one week so I don't think I can help looking at source code.
I'm not sure where the internationalization issue is occurring. If you use directional notation for coordinates (aka using N, E, S & W), you need to provide the localized versions of these letters. Since the last release (0.6.6), you can disable this by putting the below line in your LocalSettings.php file AFTER the inclusion of Maps.
$egMapsInternatDirectionLabels = false;
Let me know if this doesn't solve your problem.
Using:
- MediaWiki 1.16.0 (r70969)
- PHP 5.2.9 (litespeed)
- MySQL 5.0.91-community
With:
- Semantic MediaWiki (Version 1.5.2) (r73354)
- Semantic Forms (Version 2.0) (r73354)
- Semantic Maps (Version 0.6.6) (r73354)
- Maps (Version 0.6.6) (r73354)
- Validator (Version 0.3.6 rc1) (r73354)
I recently upgraded all of the above extensions. Maps now display as a gray box with "Loading maps..."
See an example here: http://www.mikomos.com/wiki/Sandbox
Thanks!
I am using SMW 1.5.0 and i want to use Map and SemanticMap extensions with it. Project page says that it support >SMW 1.5.1 Is there any known issues with SMW1.5.0 ?
Semantic Maps (0.6.5,0.6.6) works well on ordinal pages. But there is a problem, when I use it on pages with template.
Template (http://wiki.mephist.ru/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:%D0%9F%D0%BE%D0%B4%D1%80%D0%B0%D0%B7%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%9D%D0%98%D0%AF%D0%A3) contains:
{{
#display_point: {{{place|}}}
|controls=small
|width=260
|height=260
|zoom=16
}}
[[Coordinates:: {{#geocode:{{{place|}}}}}]]
After I have saved this template - page with it (http://wiki.mephist.ru/wiki/%D0%9D%D0%BE%D0%B2%D0%BE%D0%B2%D0%BE%D1%80%D0%BE%D0%BD%D0%B5%D0%B6%D1%81%D0%BA%D0%B8%D0%B9_%D0%BF%D0%BE%D0%BB%D0%B8%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%BA%D0%BE%D0%BB%D0%BB%D0%B5%D0%B4%D0%B6) has only the grey rectangle.
But, after resaving of page - there is a map.
Resave of template = no map.
I looked at the sourсe code and there is a different: Good page contain additional:
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAkjW9Z02Wr2DA2cO4Yz7i8xQs3rSWqIDJQozxN2O2ieoEaKtcKBTzQjsYDdYdEUB1FaBPQvU3CfRxAA&hl=ru" type="text/javascript"></script> <script src="/extensions/Maps/Services/GoogleMaps/GoogleMapFunctions.js?207-0.6.5" type="text/javascript"></script> <script type="text/javascript">window.unload = GUnload;</script>
It seems that this code should be added on template-recalculation function.
PS: Sorry for my English.
Im adding: $egMapsOLAvailableLayers['worldwind'] = array('OpenLayers.Layer.WorldWind("esat", "http://localhost:8484/", 36, 4, {T:"bmng.topo.bathy.200406"})'); to my LocalSettings.php but, im not getting hits on my local worldwind WMS, using {{#display_map:84.0,-60.0 |service=openlayers |layers=worldwind }} in the wiki. Any Ideas? Ill start firebugging......
Which version of Maps are you using? The obvious place to start debugging would be simply checking the page source, and see if the JavaScript is there correctly.
Im using Maps v064 and JS looks OK?!
function() { initOpenLayer( 'open_layer_1', -60, 84, 13, [new OpenLayers.Layer.WorldWind("esat", "http://loclahost:8484/", {layers:"esat"})], ['layerswitcher','mouseposition','autopanzoom','scaleline','navigation'], [], 'en' );
I'm not an OpenLayers guy, so can't really help you with this. I suggest you poke some OL people about it. If it turns out the extension is messing something up, let me know, then I'll fix.
Hi folks, I try to get semantic maps working (included in SemanticBundle-20100719). When I try to display specific coordinates, I get a timeout:
Warning: fopen(http://maps.google.com/maps/geo?q=46.9226575%E2%B0+n%2C+13.5758829%E2%B0+e&output=csv&key=ABQIAAAAC79wJseBo7_RL9_4fVSFOBScZy0qAvdKDthnPLbiHbalvwmwzhTR7KJSNln3vwobMZ7Mo2HBnzo4bw) [function.fopen]: failed to open stream: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. in X:\xampp\htdocs\wiki\extensions\Maps\Geocoders\Maps_BaseGeocoder.php on line 105 Fatal error: Maximum execution time of 60 seconds exceeded in X:\xampp\htdocs\wiki\extensions\Maps\Geocoders\Maps_BaseGeocoder.php on line 105
Wenn you take the the request you notice that it doesn't work! Result:
400,0,0,0
Wenn you remove "° n" and "° e" then it at least the request works:
200,8,46.9226485,13.5758828
Encoding problem with "°" in the property with type geograpfic coordinate?
I'm a bit confused - is the coordinate parsing issue related to the timeout?
I am not sure at the moment! I think it's also a data migration issue, since I get this error also if I do "SMW_refreshData.php -v" on the command line.
(1014) Processing ID 1015 ... (1015) Processing ID 1016 ... (1016) Processing ID 1017 ... Warning: fopen(http://maps.google.com/maps/geo?q=%7B%7B%7Bkoordinaten%7D%7D%7D&output=csv&key=ABQIAAAAC79wJseBo7_RL9_4fVSFOBScZy0q AvdKDthnPLbiHbalvwmwzhTR7KJSNln3vwobMZ7Mo2HBnzo4bw): failed to open stream: Ein Verbindungsversuch ist fehlgeschlagen, da die Gege nstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbu ndene Host nicht reagiert hat. in X:\xampp\htdocs\wiki\extensions\Maps\Geocoders\Maps_BaseGeocoder.php on line 105 Warning: fopen(http://maps.google.com/maps/geo?q=&output=csv&key=ABQIAAAAC79wJseBo7_RL9_4fVSFOBScZy0qAvdKDthnPLbiHbalvwmwzhTR7KJSN ln3vwobMZ7Mo2HBnzo4bw): failed to open stream: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat . in X:\xampp\htdocs\wiki\extensions\Maps\Geocoders\Maps_BaseGeocoder.php on line 105 (1017) Processing ID 1018 ... (1018) Processing ID 1019 ...
Any idea why the request could be failing? The relevant code has not changed for quite a while, and seems to be working quite well, so I'm guessing it's something about your setup that's making the request fail.
Still investigating. A plain "{{#display_points:New York City;Moscow;Berlin}}" produces the same error, so I have obviously have connection problems (Proxy? Intranet? Google-API Key?)...
In case you are using a proxy:
Maps 0.6.6 alpha (on svn trunk) supports the MediaWiki proxy setting [0], which should allow you to use the geocoding services without any problems. Can you give this a try? You can get the code here [1] and here [2]. If you don't know how to get it from svn, I'll build an alpha package for you.
[0] https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Manual:$wgHTTPProxy [1] http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Maps/ [2] http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticMaps/
You can now try out 0.6.6 rc, which should have the MediaWiki proxy support working.
Thx. The proxy-issue is solved!
But I still have troubles with the notation of coordinates. If a plain number is given, it works. If there are other characters (°,',", NSWE), it does not! I also tried the parser fuction "coordinates" (as described in http://mapping.referata.com/wiki/Help:Coordinates) and I have the same problems. Here is my source. Please tell if you need further details (mysqldb, Localsettings, etc.):
== Test 1 (works) ==
;Expected result: 55° 45' 21" N, 37° 37' 3" W
:OK: {{#coordinates:55.7557860, -37.6176330|format=dms|directional=yes}}
:OK: {{#coordinates:55.7557860, -37.6176330|dms|yes}}
:OK: {{#coordinates:55.7557860, -37.6176330|directional=yes|dms}}
== after data migration = as saved (does not work) ==
{{#display_points:coordinates=46.7555539° N, 13.0214349° E|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
{{#display_points:coordinates=46.7555539° N, 13.0214349° O|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
== alternative 1 (does not work) ==
{{#display_points:coordinates=46° 45' 20" N, 13° 1' 17" E|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
{{#display_points:coordinates=46° 45' 20" N, 13° 1' 17" O|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
== alternative 2 (works) ==
{{#display_points:coordinates=46.7555539, 13.0214349|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
== Test 2 (does not work) ==
;Expected Result: 55° 45' 21" N, 37° 37' 3" W
<!--
:DOES NOT WORK (no output at all; page rendering aborts): {{#coordinates:55.7557860° N, 37.6176330° W}}
:DOES NOT WORK (no output at all; page rendering aborts): {{#coordinates:location=55.7557860° N, 37.6176330° W}}
-->
I confirmed there is some odd stuff going on with the coordinate parsing, but have not been able to pin down the cause yet. Will try to get this fixed for 0.6.6.
I found a bug I introduced in 0.6.3 or 0.6.4 that I think was causing your problem. Can you try out 0.6.6 RC2 and confirm this?
There is now also a setting you can use to disable internationalization of direction labels, by adding this to your LocalSettings.php file:
$egMapsInternatDirectionLabels = false;
Maps and coordinates are now working. Thx.
== Test 1 (works) ==
;Expected result: 55° 45' 21" N, 37° 37' 3" W
:OK: {{#coordinates:55.7557860, -37.6176330|format=dms|directional=yes}}
:OK: {{#coordinates:55.7557860, -37.6176330|dms|yes}}
:OK: {{#coordinates:55.7557860, -37.6176330|directional=yes|dms}}
== after data migration = as saved (works) ==
{{#display_points:coordinates=46.7555539° N, 13.0214349° E|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
{{#display_points:coordinates=46.7555539° N, 13.0214349° O|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
== alternative 1 (works) ==
{{#display_points:coordinates=46° 45' 20" N, 13° 1' 17" E|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
{{#display_points:coordinates=46° 45' 20" N, 13° 1' 17" O|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
== alternative 2 (works) ==
{{#display_points:coordinates=46.7555539, 13.0214349|types=normal,hybrid,satellite,physical,earth|title=Gemeinde Irschen|label=9020 Velden<br/>Seeweg 1}}
== Test 2 (works) ==
;Expected Result (55° 45' 21" N, 37° 37' 3" W)
: {{#coordinates:55.7557860° N, 37.6176330° W}}
: {{#coordinates:location=55.7557860° N, 37.6176330° W}}
Cheers.
How to reproduce: On a page "AAAA" I defined the following and i saved the page (2 times)
[[Coordinates::{{#geocode:0° 42' 51", -75° 59' 38"}}]]
[[Coordinates1::{{#show:AAAA|?Coordinates|link=none}} ]]
We aspect that the property coordinates1 will be the same as coordinates, but we have the error: "The following coordinate was not recognized: 0° 42' 51'"'; N, 75° 59' 38'"'; W."
Is this correct behaviour ?
Regards Gio
Can you provide the version information of your MediaWiki install and extensions? (You can find it on Special:Version)
- mediawiki 1.16.0
- Semantic MediaWiki (Version 1.5.2 alpha-1)
- maps Version 0.6.5
- Semantic Maps (Version 0.6.5)
--193.192.232.39 10:18, 12 August 2010 (UTC)
That sounds like a bug then. Can you provide a link to where this is happening?
I can not pass the URL bacause our mediawiki installation is in development stage an is only an intranet solution.
FYI: I saw that with semantic map 0.6 alpha the behaviour is correct but the online services is not working.
Gio
Hey J, can you help me? I'm getting this error when trying to submit a form with the Geographic coordinate property:
The website cannot display the page
HTTP 500
Most likely causes:
•The website is under maintenance.
•The website has a programming error.
I've included the property in the form like this:
! Coordinates: | {{{field|Coordinates}}}
and in the template like this:
! Coordinates | [[Coordinates::{{{Coordinates|}}}]]
If I remove the property from either the template or the form the submission goes smoothly. I am running the following versions:
MW 1.15.1, SMW 1.4.2, Forms 1.7.3, Maps 0.6.4, Semantic Maps 0.6.4, Validator 0.3.4
Thanks! Darryl
Upgrading your SMW to the latest release should fix the problem - the combination of versions you have is not supported, see http://mapping.referata.com/wiki/Template:Semantic_Maps_0.6.4_dependencies
I was trying to map a defined location from the Coordinates Facts icon to google map ,but the provides service take the wrong parametrs. You can simply reproduce this by clicking on the blue icon in the Facts coordinates field on the page http://semantic-mediawiki.org/wiki/Berlin
Is there a solution for that? Regards Gio
Service links are disabled in the version of Semantic Maps that is installed on semantic-mediawiki.org. They have been added again in Semantic Maps 0.6.3 or 0.6.4. The values have changed though, see here for the current ones. The version of Semantic Maps needs to be updated on the SMW wiki for the examples to work again.
Jeroen,
I'm trying now to use Semantic Maps.
Cau you tell me why the map is not showing?
{{
- ask:
|Categoria::Restaurantes Bairro::Ipanema |?LatLong | format = map }}
Regards, Edgard.
You did not define the type of your property @ http://www.page.com/index.php?title=Property:LatLong
It needs to be of type geographical coordinates, please see the SMW documentation @ http://semantic-mediawiki.org/wiki/Help:Properties_and_types
Do you guys know what this might be?
Fatal error: Call to a member function setInputTypeHook() on a non-object in /home/storage/3/a9/47/wikirio/public_html/extensions/SemanticMaps/Features/FormInputs/SM_FormInputs.php on line 103
C'mon, seriously!. I'm not ceiling cat, so please provide some information about what version you are running...
- ))))))))))))))))
MediaWiki 1.16.0beta3 Maps 0.6.4 Semantic Maps 0.6.4 Semantic MediaWiki 1.5.1.1
Thanks Jeroen! :)
In Localhost the applications are called in this order:
-
- SEMANTIC MEDIAWIKI
- http://www.mediawiki.org/wiki/Semantic_MediaWikin
include_once("$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php"); enableSemantics('wikirio.com.br');
-
- SEMANTIC FORMS
- http://www.mediawiki.org/wiki/Extension:Semantic_Forms
Include_once("$IP/extensions/SemanticForms/includes/SF_Settings.php");
-
- MAPS
require_once( "$IP/extensions/Validator/Validator.php" ); require_once( "$IP/extensions/Maps/Maps.php" );
-
- Semantic Maps
- http://mapping.referata.com/wiki/Semantic_Maps
- require_once("$IP/extensions/SemanticMaps/SemanticMaps.php");
(Last on commented because of the error)
I don't see anything wrong there... What version of Semantic Forms are you using?
Jeron,
When you go to http://www.wikirio.com.br/Cobal_do_Humait%C3%A1 does the map work?
For me and another friend, it only works when I edit the page and save.
Sematic Forms: 1.9.1
Thanks, Edgard.
Did you include Maps before Semantic Forms? It needs to be included after it, as the installation instructions clearly indicate.
Hi, I tried to define a new property. In german the type is called Geografische_Koordinaten. But it did not work because of an unknown type.
After changing the language settings from German to English everthing works as expected. I changed the values in smw_spec2 to Geographic_coordinate and now it also works with german language settings.
Hi, I'd really appreciate if someone could help me out here. I wanted to use SM for showing the locations of all the database users around the world. The "Current residence city" is a property I have installed. The code I use is:
{{#ask: [[Category:Users]]
| ?Current residence city
| format=googlemap
}}
However I dont see any map in the produced page!! To be clear, the users havent input their cities as coordinates, but by names. Using geocoding, I can get each one of their cities individually like this:
{{#if:{{{Current residence city|}}} | {{#display_point:{{{Current residence city}}}|service=google}}}}
But I cannot get their locations aggregated in SMW query.
I wonder what could be wrong?
Thanks!
Hey,
You can not directly have address geocoded in queries, as this would be very inefficient, and probably get you banned from the geoservice you are using. What you should do in your situation is geocode the address on each page, and store it in a property that you then can query on.
On your pages:
[[Has coordinates::{{#Geocode:{{{Current residence city|}}}}}]]
Your query:
{{#ask: [[Category:Users]]
| ?Has coordinates
| format=googlemap
}}
Thanks Jeroen....I did that but still doesnt work. Firstly, I assign Current city coordinate as property Geographic coordinate and say
[[Current city coordinate::{{#geocode: {{{Current residence city|}}}}}]]
does indeed properly geocode to correct coordinates, but gives the following error message
The following coordinate was not recognized: 42° 43' 57" N, 84° 33' 20" W.
And probably for that reason, when I ask the query, there's no map displayed.
Any suggestions?
Thanks
Just installed the semantic maps extension for the very first time to have a "play" with it. Doing so I have hit an error:
From Apache's error log:
[Sun Jun 06 14:47:44 2010] [error] [client 127.0.0.1] PHP Fatal error: Class SMGeoCoordsValue contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (SMWDataValue::parseXSDValue, SMWDataValue::getXSDValue) in /var/lib/mediawiki/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php on line 317, referer: http://localhost/mediawiki/index.php?title=Sand_Box&action=submit
The error occurred after trying to save a newly created wiki page (no matter whether it contains any map markup or not. The page did however display in the preview properly multiple times before hand, also displaying map elements.
Setup:
- 32 bit Ubuntu Lucid (10.04) with Apache 2.2 (2.2.14-5ubuntu), PHP 5.3 (5.3.2-1ubuntu4.2) and MySQL 5.1 (5.1.41-3ubuntu12.1) from repositories
- MediaWiki (version 1:1.15.1-1ubuntu2.1) and Semantic MediaWiki (version 1.4.0-1) from Ubuntu repositories
- version 0.6.1 of MapsAndSemanticMaps bundle
Tried to reproduce the problem on http://mapping.referata.com/w/index.php?title=Sand_Box, but it failed to show
Your SMW version is to outdated for SM 0.6.1. See http://mapping.referata.com/wiki/Template:Semantic_Maps_0.6.1_dependencies
In a blank install on a MediaWiki from the Ubuntu base system, with the added MapsAndSemanticMaps bundle, an attempt to view the (only) wiki page in the wiki (Main_Page) results in this error message:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "SMW::getSMWPageID". MySQL returned error "1146: Table 'wikidb.smw_ids' doesn't exist (localhost)".
The install was performed according to best (but very limited) knowledge following http://mapping.referata.com/wiki/Maps#Installation. The install guide did not mention any modifications or installs that would alter the database layout, so I might have missed something.
Setup:
- 32 bit Ubuntu Lucid (10.04) with Apache 2.2 (2.2.14-5ubuntu), PHP 5.3 (5.3.2-1ubuntu4.2) and MySQL 5.1 (5.1.41-3ubuntu12.1) from repositories
- MediaWiki (version 1:1.15.1-1ubuntu2.1) and Semantic MediaWiki (version 1.4.0-1) from Ubuntu repositories
- version 0.6.1 of MapsAndSemanticMaps bundle
I guess you did miss the installation instructions for SMW :)
http://semantic-mediawiki.org/wiki/Help:Installation
Basically you need to go to Special:SMWAdmin, and hit the "initialize or update tables" button.
When I try to go to the special page after all the necessary upgrade, I got this:
Fatal error: Class 'SMFormInput' not found in /home/.../transitunlimited.org/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsFormInput.php on line 18
I think I had the same issue when I tried version 1.5, which was fixed.