Using the Google map widget

21 views
Skip to first unread message

Jacqui

unread,
Aug 1, 2012, 7:41:15 AM8/1/12
to linke...@googlegroups.com
Salut Karima,

I have been trying to follow the example on the LinkedWiki extension page to display results using the Google map widget.

I have the widgets extension working and I can display a map using Google Maps.  I have the LinkedWiki extension and I
can display results in a table.

I have tried the following to display results in a map

{{#wsparql: Google Maps
|query=
select ?lat ?lng
where {?s a <http://dbpedia.org/class/yago/OlympicSwimmersOfGreatBritain> .
?s <http://www.w3.org/2000/01/rdf-schema#label> ?Name .
?s <http://dbpedia.org/property/placeOfBirth> ?PlaceOfBirth .
?PlaceOfBirth geo:lat ?lat .
?PlaceOfBirth geo:long ?lng .
}
limit 1
|endpoint = http://dbpedia.org/sparql
|cache = NO
|debug = YES
|defaultcolor=blue
|zoom=5
|size=512x512
|static=yes
|maptype=roadmap}}

It does not get the latitude and longitude so the map is centered on 0,0.

I tried looking at the result from the parser and I get

{{#widget:Google Maps
|endpoint = http://dbpedia.org/sparql
| defaultcolor=blue
| zoom=5
| size=512x512
| static=yes
| maptype=roadmap
|rows.0.lat=51.5
| rows.0.lng=-0.116667}}

and I can see that the problem is that the coordinates need to be called just lat
and lng not rows.0.lat and rows.0.lng.

There is a comment on your page about the widget needing to be able to handle
parameters in that form and I notice in your example that the name of the map widget
that you are using is Google_Static_Maps. The only Google map widget I have found
is called Google maps.

So my question is should I be using a different widget, and if so where do I get it
from?

Regards
Jacqui

Karima Rafes

unread,
Aug 1, 2012, 2:38:31 PM8/1/12
to linke...@googlegroups.com
Hi,

I developed the Widget:Google_Static_Maps but mediawikiwidgets.org
deleted my widget :(
However It's still there : https://0x20.be/Widget:Google_Static_Maps

On my wiki : I upgraded the first version in function of context :
http://en.sparql.pro/wiki/IssySpots_public_services
Widget : http://en.sparql.pro/w/index.php?title=Widget:Google_Maps_Issy&action=edit

http://en.sparql.pro/wiki/Find_school_in_england
Widget : http://en.sparql.pro/w/index.php?title=Widget:Google_Maps_Find_school_in_england&action=edit

Post me the link of your page when you will finish ;)

Bye
Karima

2012/8/1 Jacqui <jh...@postmaster.co.uk>:

Jacqui

unread,
Aug 3, 2012, 6:41:23 AM8/3/12
to linke...@googlegroups.com
Hi Karima,

Thanks for the reply, I understand now.

I have it working using your widget but I can't send you a link as I am just doing an
internal demo at the moment.  We have been looking at getting MediaWiki, SemanticMediaWiki
and LinkedWiki working with OpenLink Virtuoso.

Thanks again
Jacqui
Reply all
Reply to author
Forward
0 new messages