<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.socialstack.dev/index.php?action=history&amp;feed=atom&amp;title=Slippy_Map</id>
	<title>Slippy Map - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.socialstack.dev/index.php?action=history&amp;feed=atom&amp;title=Slippy_Map"/>
	<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Slippy_Map&amp;action=history"/>
	<updated>2026-10-16T08:49:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.socialstack.dev/index.php?title=Slippy_Map&amp;diff=279&amp;oldid=prev</id>
		<title>Luke: Created page with &quot;A slippy map is a UI component which can zoom and pan (think something like Google Maps). On a desktop this is with dragging the mouse and the scrollwheel. On mobile it is thr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Slippy_Map&amp;diff=279&amp;oldid=prev"/>
		<updated>2022-09-01T22:11:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;A slippy map is a UI component which can zoom and pan (think something like Google Maps). On a desktop this is with dragging the mouse and the scrollwheel. On mobile it is thr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A slippy map is a UI component which can zoom and pan (think something like Google Maps). On a desktop this is with dragging the mouse and the scrollwheel. On mobile it is through pinch zooming and dragging. SocialStack has a slippy map component which can display any content you would like, and of course it is typically used for maps.&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
Install the slippy map component into your project:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
socialstack install UI/SlippyMap&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From there, the simplest usage is by giving it an image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
import SlippyMap from &amp;#039;UI/SlippyMap&amp;#039;;&lt;br /&gt;
import myMapRef from &amp;#039;./static/map.svg&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return &amp;lt;SlippyMap imageRef={myMapRef} /&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will likely need to set the height on the .slippy-map div to ensure that it takes up the most appropriate amount of screen space for your needs.&lt;br /&gt;
&lt;br /&gt;
= Controls =&lt;br /&gt;
&lt;br /&gt;
The map can display controls over the top which can be used to manipulate the state of the map or for additional custom controls as necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
import SlippyMap from &amp;#039;UI/SlippyMap&amp;#039;;&lt;br /&gt;
import myMapRef from &amp;#039;./static/map.svg&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
return &amp;lt;SlippyMap imageRef={myMapRef} controls={(step, values, mapController) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
    return &amp;lt;&amp;gt;&amp;lt;button onClick={() =&amp;gt; {mapController.resetToInitialState()}}&amp;gt;Reset view&amp;lt;/button&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
}}/&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Controls are displayed inside a div with the class .overhead-ui and defaults to displaying in the bottom left corner, however by targeting that class you can display it elsewhere (or in all 4 corners for example).&lt;/div&gt;</summary>
		<author><name>Luke</name></author>
	</entry>
</feed>