« Ajaxquery » : différence entre les versions
De Semantic MediaWiki - Sandbox
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 18 : | Ligne 18 : | ||
| ajaxquery = [[Category:Locations]] | | ajaxquery = [[Category:Locations]] | ||
| ajaxcoordproperty = Has coordinates | | ajaxcoordproperty = Has coordinates | ||
}} | |||
example without ajax, no new points are loaded when zooming out: | |||
<pre> | |||
{{#ask: | |||
[[Category:Location]] [[Has coordinates::52° 30' 59", 13° 24' 0" E (50 km)]] [[Has coordinates::+]] | |||
| ?Has coordinates | |||
| format = leaflet | |||
}} | |||
</pre> | |||
{{#ask: | |||
[[Category:Location]] [[Has coordinates::52° 30' 59", 13° 24' 0" E (50 km)]] [[Has coordinates::+]] | |||
| ?Has coordinates | |||
| format = leaflet | |||
}} | }} | ||
[[Category:Semantic Maps example]] | [[Category:Semantic Maps example]] |
Version du 2 août 2016 à 21:03
Issue
You don't want all the points on the map to load (because of performance reasons), just the points that are currently in the field of view.
Load new points when dragging/zooming the map
{{#ask: [[Category:Location]] [[Has coordinates::52° 30' 59", 13° 24' 0" E (50 km)]] [[Has coordinates::+]] | ?Has coordinates | format = leaflet | ajaxquery = [[Category:Locations]] | ajaxcoordproperty = Has coordinates }}
example without ajax, no new points are loaded when zooming out:
{{#ask: [[Category:Location]] [[Has coordinates::52° 30' 59", 13° 24' 0" E (50 km)]] [[Has coordinates::+]] | ?Has coordinates | format = leaflet }}