first import

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-08 11:40:19 +02:00
commit 1bc61b12ad
8435 changed files with 1582817 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Feature 01",
"description": "Just testing things..."
},
"geometry": {
"type": "Point",
"coordinates": [
86.8359375,
50.80078125
]
},
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
}
},
{
"type": "Feature",
"properties": {
"name": "Feature 02",
"description": "Just testing things..."
},
"geometry": {
"type": "Point",
"coordinates": [
101.6015625,
51.85546875
]
},
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
}
},
{
"type": "Feature",
"properties": {
"name": "Feature 03",
"description": "Just testing things..."
},
"geometry": {
"type": "Point",
"coordinates": [
110.7421875,
39.55078125
]
},
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
}
}
]
}

View File

@@ -0,0 +1,915 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>KML Samples</name>
<open>1</open>
<description>Unleash your creativity with the help of these examples!</description>
<Style id="downArrowIcon">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal4/icon28.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="globeIcon">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon19.png</href>
</Icon>
</IconStyle>
<LineStyle>
<width>2</width>
</LineStyle>
</Style>
<Style id="transPurpleLineGreenPoly">
<LineStyle>
<color>7fff00ff</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>7f00ff00</color>
</PolyStyle>
</Style>
<Style id="yellowLineGreenPoly">
<LineStyle>
<color>7f00ffff</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>7f00ff00</color>
</PolyStyle>
</Style>
<Style id="thickBlackLine">
<LineStyle>
<color>87000000</color>
<width>10</width>
</LineStyle>
</Style>
<Style id="redLineBluePoly">
<LineStyle>
<color>ff0000ff</color>
</LineStyle>
<PolyStyle>
<color>ffff0000</color>
</PolyStyle>
</Style>
<Style id="blueLineRedPoly">
<LineStyle>
<color>ffff0000</color>
</LineStyle>
<PolyStyle>
<color>ff0000ff</color>
</PolyStyle>
</Style>
<Style id="transRedPoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7d0000ff</color>
</PolyStyle>
</Style>
<Style id="transBluePoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7dff0000</color>
</PolyStyle>
</Style>
<Style id="transGreenPoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7d00ff00</color>
</PolyStyle>
</Style>
<Style id="transYellowPoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7d00ffff</color>
</PolyStyle>
</Style>
<Style id="noDrivingDirections">
<BalloonStyle>
<text><![CDATA[
<b>$[name]</b>
<br /><br />
$[description]
]]></text>
</BalloonStyle>
</Style>
<Folder>
<name>Placemarks</name>
<description>These are just some of the different kinds of placemarks with
which you can mark your favorite places</description>
<LookAt>
<longitude>-122.0839597145766</longitude>
<latitude>37.42222904525232</latitude>
<altitude>0</altitude>
<heading>-148.4122922628044</heading>
<tilt>40.5575073395506</tilt>
<range>500.6566641072245</range>
</LookAt>
<Placemark>
<name>Simple placemark</name>
<description>Attached to the ground. Intelligently places itself at the
height of the underlying terrain.</description>
<Point>
<coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Floating placemark</name>
<visibility>0</visibility>
<description>Floats a defined distance above the ground.</description>
<LookAt>
<longitude>-122.0839597145766</longitude>
<latitude>37.42222904525232</latitude>
<altitude>0</altitude>
<heading>-148.4122922628044</heading>
<tilt>40.5575073395506</tilt>
<range>500.6566641072245</range>
</LookAt>
<styleUrl>#downArrowIcon</styleUrl>
<Point>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-122.084075,37.4220033612141,50</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Extruded placemark</name>
<visibility>0</visibility>
<description>Tethered to the ground by a customizable
&quot;tail&quot;</description>
<LookAt>
<longitude>-122.0845787421525</longitude>
<latitude>37.42215078737763</latitude>
<altitude>0</altitude>
<heading>-148.4126684946234</heading>
<tilt>40.55750733918048</tilt>
<range>365.2646606980322</range>
</LookAt>
<styleUrl>#globeIcon</styleUrl>
<Point>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-122.0857667006183,37.42156927867553,50</coordinates>
</Point>
</Placemark>
</Folder>
<Folder>
<name>Styles and Markup</name>
<visibility>0</visibility>
<description>With KML it is easy to create rich, descriptive markup to
annotate and enrich your placemarks</description>
<LookAt>
<longitude>-122.0845787422371</longitude>
<latitude>37.42215078726837</latitude>
<altitude>0</altitude>
<heading>-148.4126777488172</heading>
<tilt>40.55750733930874</tilt>
<range>365.2646826292919</range>
</LookAt>
<styleUrl>#noDrivingDirections</styleUrl>
<Document>
<name>Highlighted Icon</name>
<visibility>0</visibility>
<description>Place your mouse over the icon to see it display the new
icon</description>
<LookAt>
<longitude>-122.0856552124024</longitude>
<latitude>37.4224281311035</latitude>
<altitude>0</altitude>
<heading>0</heading>
<tilt>0</tilt>
<range>265.8520424250024</range>
</LookAt>
<Style id="highlightPlacemark">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/paddle/red-stars.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="normalPlacemark">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/paddle/wht-blank.png</href>
</Icon>
</IconStyle>
</Style>
<StyleMap id="exampleStyleMap">
<Pair>
<key>normal</key>
<styleUrl>#normalPlacemark</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#highlightPlacemark</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>Roll over this icon</name>
<visibility>0</visibility>
<styleUrl>#exampleStyleMap</styleUrl>
<Point>
<coordinates>-122.0856545755255,37.42243077405461,0</coordinates>
</Point>
</Placemark>
</Document>
<Placemark>
<name>Descriptive HTML</name>
<visibility>0</visibility>
<description><![CDATA[Click on the blue link!<br><br>
Placemark descriptions can be enriched by using many standard HTML tags.<br>
For example:
<hr>
Styles:<br>
<i>Italics</i>,
<b>Bold</b>,
<u>Underlined</u>,
<s>Strike Out</s>,
subscript<sub>subscript</sub>,
superscript<sup>superscript</sup>,
<big>Big</big>,
<small>Small</small>,
<tt>Typewriter</tt>,
<em>Emphasized</em>,
<strong>Strong</strong>,
<code>Code</code>
<hr>
Fonts:<br>
<font color="red">red by name</font>,
<font color="#408010">leaf green by hexadecimal RGB</font>
<br>
<font size=1>size 1</font>,
<font size=2>size 2</font>,
<font size=3>size 3</font>,
<font size=4>size 4</font>,
<font size=5>size 5</font>,
<font size=6>size 6</font>,
<font size=7>size 7</font>
<br>
<font face=times>Times</font>,
<font face=verdana>Verdana</font>,
<font face=arial>Arial</font><br>
<hr>
Links:
<br>
<a href="http://earth.google.com/">Google Earth!</a>
<br>
or: Check out our website at www.google.com
<hr>
Alignment:<br>
<p align=left>left</p>
<p align=center>center</p>
<p align=right>right</p>
<hr>
Ordered Lists:<br>
<ol><li>First</li><li>Second</li><li>Third</li></ol>
<ol type="a"><li>First</li><li>Second</li><li>Third</li></ol>
<ol type="A"><li>First</li><li>Second</li><li>Third</li></ol>
<hr>
Unordered Lists:<br>
<ul><li>A</li><li>B</li><li>C</li></ul>
<ul type="circle"><li>A</li><li>B</li><li>C</li></ul>
<ul type="square"><li>A</li><li>B</li><li>C</li></ul>
<hr>
Definitions:<br>
<dl>
<dt>Google:</dt><dd>The best thing since sliced bread</dd>
</dl>
<hr>
Centered:<br><center>
Time present and time past<br>
Are both perhaps present in time future,<br>
And time future contained in time past.<br>
If all time is eternally present<br>
All time is unredeemable.<br>
</center>
<hr>
Block Quote:
<br>
<blockquote>
We shall not cease from exploration<br>
And the end of all our exploring<br>
Will be to arrive where we started<br>
And know the place for the first time.<br>
<i>-- T.S. Eliot</i>
</blockquote>
<br>
<hr>
Headings:<br>
<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h3>Header 4</h4>
<h3>Header 5</h5>
<hr>
Images:<br>
<i>Remote image</i><br>
<img src="http://code.google.com/apis/kml/documentation/googleSample.png"><br>
<i>Scaled image</i><br>
<img src="http://code.google.com/apis/kml/documentation/googleSample.png" width=100><br>
<hr>
Simple Tables:<br>
<table border="1" padding="1">
<tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr>
<tr><td>a</td><td>b</td><td>c</td><td>d</td><td>e</td></tr>
</table>
<br>
[Did you notice that double-clicking on the placemark doesn't cause the viewer to take you anywhere? This is because it is possible to directly author a "placeless placemark". If you look at the code for this example, you will see that it has neither a point coordinate nor a LookAt element.]]]></description>
</Placemark>
</Folder>
<Folder>
<name>Ground Overlays</name>
<visibility>0</visibility>
<description>Examples of ground overlays</description>
<GroundOverlay>
<name>Large-scale overlay on terrain</name>
<visibility>0</visibility>
<description>Overlay shows Mount Etna erupting on July 13th, 2001.</description>
<LookAt>
<longitude>15.02468937557116</longitude>
<latitude>37.67395167941667</latitude>
<altitude>0</altitude>
<heading>-16.5581842842829</heading>
<tilt>58.31228652890705</tilt>
<range>30350.36838438907</range>
</LookAt>
<Icon>
<href>http://code.google.com/apis/kml/documentation/etna.jpg</href>
</Icon>
<LatLonBox>
<north>37.91904192681665</north>
<south>37.46543388598137</south>
<east>15.35832653742206</east>
<west>14.60128369746704</west>
<rotation>-0.1556640799496235</rotation>
</LatLonBox>
</GroundOverlay>
</Folder>
<Folder>
<name>Screen Overlays</name>
<visibility>0</visibility>
<description>Screen overlays have to be authored directly in KML. These
examples illustrate absolute and dynamic positioning in screen space.</description>
<ScreenOverlay>
<name>Simple crosshairs</name>
<visibility>0</visibility>
<description>This screen overlay uses fractional positioning to put the
image in the exact center of the screen</description>
<Icon>
<href>http://code.google.com/apis/kml/documentation/crosshairs.png</href>
</Icon>
<overlayXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
<screenXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
<rotationXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
<size x="0" y="0" xunits="pixels" yunits="pixels"/>
</ScreenOverlay>
<ScreenOverlay>
<name>Absolute Positioning: Top left</name>
<visibility>0</visibility>
<Icon>
<href>http://code.google.com/apis/kml/documentation/top_left.jpg</href>
</Icon>
<overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0" y="0" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
<ScreenOverlay>
<name>Absolute Positioning: Top right</name>
<visibility>0</visibility>
<Icon>
<href>http://code.google.com/apis/kml/documentation/top_right.jpg</href>
</Icon>
<overlayXY x="1" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="1" y="1" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0" y="0" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
<ScreenOverlay>
<name>Absolute Positioning: Bottom left</name>
<visibility>0</visibility>
<Icon>
<href>http://code.google.com/apis/kml/documentation/bottom_left.jpg</href>
</Icon>
<overlayXY x="0" y="-1" xunits="fraction" yunits="fraction"/>
<screenXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0" y="0" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
<ScreenOverlay>
<name>Absolute Positioning: Bottom right</name>
<visibility>0</visibility>
<Icon>
<href>http://code.google.com/apis/kml/documentation/bottom_right.jpg</href>
</Icon>
<overlayXY x="1" y="-1" xunits="fraction" yunits="fraction"/>
<screenXY x="1" y="0" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0" y="0" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
<ScreenOverlay>
<name>Dynamic Positioning: Top of screen</name>
<visibility>0</visibility>
<Icon>
<href>http://code.google.com/apis/kml/documentation/dynamic_screenoverlay.jpg</href>
</Icon>
<overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="1" y="0.2" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
<ScreenOverlay>
<name>Dynamic Positioning: Right of screen</name>
<visibility>0</visibility>
<Icon>
<href>http://code.google.com/apis/kml/documentation/dynamic_right.jpg</href>
</Icon>
<overlayXY x="1" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="1" y="1" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0" y="1" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
</Folder>
<Folder>
<name>Paths</name>
<visibility>0</visibility>
<description>Examples of paths. Note that the tessellate tag is by default
set to 0. If you want to create tessellated lines, they must be authored
(or edited) directly in KML.</description>
<Placemark>
<name>Tessellated</name>
<visibility>0</visibility>
<description><![CDATA[If the <tessellate> tag has a value of 1, the line will contour to the underlying terrain]]></description>
<LookAt>
<longitude>-112.0822680013139</longitude>
<latitude>36.09825589333556</latitude>
<altitude>0</altitude>
<heading>103.8120432044965</heading>
<tilt>62.04855796276328</tilt>
<range>2889.145007690472</range>
</LookAt>
<LineString>
<tessellate>1</tessellate>
<coordinates> -112.0814237830345,36.10677870477137,0
-112.0870267752693,36.0905099328766,0 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Untessellated</name>
<visibility>0</visibility>
<description><![CDATA[If the <tessellate> tag has a value of 0, the line follow a simple straight-line path from point to point]]></description>
<LookAt>
<longitude>-112.0822680013139</longitude>
<latitude>36.09825589333556</latitude>
<altitude>0</altitude>
<heading>103.8120432044965</heading>
<tilt>62.04855796276328</tilt>
<range>2889.145007690472</range>
</LookAt>
<LineString>
<tessellate>0</tessellate>
<coordinates> -112.080622229595,36.10673460007995,0
-112.085242575315,36.09049598612422,0 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Absolute</name>
<visibility>0</visibility>
<description>Transparent purple line</description>
<LookAt>
<longitude>-112.2719329043177</longitude>
<latitude>36.08890633450894</latitude>
<altitude>0</altitude>
<heading>-106.8161545998597</heading>
<tilt>44.60763714063257</tilt>
<range>2569.386744398339</range>
</LookAt>
<styleUrl>#transPurpleLineGreenPoly</styleUrl>
<LineString>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates> -112.265654928602,36.09447672602546,2357
-112.2660384528238,36.09342608838671,2357
-112.2668139013453,36.09251058776881,2357
-112.2677826834445,36.09189827357996,2357
-112.2688557510952,36.0913137941187,2357
-112.2694810717219,36.0903677207521,2357
-112.2695268555611,36.08932171487285,2357
-112.2690144567276,36.08850916060472,2357
-112.2681528815339,36.08753813597956,2357
-112.2670588176031,36.08682685262568,2357
-112.2657374587321,36.08646312301303,2357 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Absolute Extruded</name>
<visibility>0</visibility>
<description>Transparent green wall with yellow outlines</description>
<LookAt>
<longitude>-112.2643334742529</longitude>
<latitude>36.08563154742419</latitude>
<altitude>0</altitude>
<heading>-125.7518698668815</heading>
<tilt>44.61038665812578</tilt>
<range>4451.842204068102</range>
</LookAt>
<styleUrl>#yellowLineGreenPoly</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates> -112.2550785337791,36.07954952145647,2357
-112.2549277039738,36.08117083492122,2357
-112.2552505069063,36.08260761307279,2357
-112.2564540158376,36.08395660588506,2357
-112.2580238976449,36.08511401044813,2357
-112.2595218489022,36.08584355239394,2357
-112.2608216347552,36.08612634548589,2357
-112.262073428656,36.08626019085147,2357
-112.2633204928495,36.08621519860091,2357
-112.2644963846444,36.08627897945274,2357
-112.2656969554589,36.08649599090644,2357 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Relative</name>
<visibility>0</visibility>
<description>Black line (10 pixels wide), height tracks terrain</description>
<LookAt>
<longitude>-112.2580438551384</longitude>
<latitude>36.1072674824385</latitude>
<altitude>0</altitude>
<heading>4.947421249553717</heading>
<tilt>44.61324882043339</tilt>
<range>2927.61105910266</range>
</LookAt>
<styleUrl>#thickBlackLine</styleUrl>
<LineString>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates> -112.2532845153347,36.09886943729116,645
-112.2540466121145,36.09919570465255,645
-112.254734666947,36.09984998366178,645
-112.255493345654,36.10051310621746,645
-112.2563157098468,36.10108441943419,645
-112.2568033076439,36.10159722088088,645
-112.257494011321,36.10204323542867,645
-112.2584106072308,36.10229131995655,645
-112.2596588987972,36.10240001286358,645
-112.2610581199487,36.10213176873407,645
-112.2626285262793,36.10157011437219,645 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Relative Extruded</name>
<visibility>0</visibility>
<description>Opaque blue walls with red outline, height tracks terrain</description>
<LookAt>
<longitude>-112.2683594333433</longitude>
<latitude>36.09884362144909</latitude>
<altitude>0</altitude>
<heading>-72.24271551768405</heading>
<tilt>44.60855445139561</tilt>
<range>2184.193522571467</range>
</LookAt>
<styleUrl>#redLineBluePoly</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates> -112.2656634181359,36.09445214722695,630
-112.2652238941097,36.09520916122063,630
-112.2645079986395,36.09580763864907,630
-112.2638827428817,36.09628572284063,630
-112.2635746835406,36.09679275951239,630
-112.2635711822407,36.09740038871899,630
-112.2640296531825,36.09804913435539,630
-112.264327720538,36.09880337400301,630
-112.2642436562271,36.09963644790288,630
-112.2639148687042,36.10055381117246,630
-112.2626894973474,36.10149062823369,630 </coordinates>
</LineString>
</Placemark>
</Folder>
<Folder>
<name>Polygons</name>
<visibility>0</visibility>
<description>Examples of polygon shapes</description>
<Folder>
<name>Google Campus</name>
<visibility>0</visibility>
<description>A collection showing how easy it is to create 3-dimensional
buildings</description>
<LookAt>
<longitude>-122.084120030116</longitude>
<latitude>37.42174011925477</latitude>
<altitude>0</altitude>
<heading>-34.82469740081282</heading>
<tilt>53.454348562403</tilt>
<range>276.7870053764046</range>
</LookAt>
<Placemark>
<name>Building 40</name>
<visibility>0</visibility>
<styleUrl>#transRedPoly</styleUrl>
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -122.0848938459612,37.42257124044786,17
-122.0849580979198,37.42211922626856,17
-122.0847469573047,37.42207183952619,17
-122.0845725380962,37.42209006729676,17
-122.0845954886723,37.42215932700895,17
-122.0838521118269,37.42227278564371,17
-122.083792243335,37.42203539112084,17
-122.0835076656616,37.42209006957106,17
-122.0834709464152,37.42200987395161,17
-122.0831221085748,37.4221046494946,17
-122.0829247374572,37.42226503990386,17
-122.0829339169385,37.42231242843094,17
-122.0833837359737,37.42225046087618,17
-122.0833607854248,37.42234159228745,17
-122.0834204551642,37.42237075460644,17
-122.083659133885,37.42251292011001,17
-122.0839758438952,37.42265873093781,17
-122.0842374743331,37.42265143972521,17
-122.0845036949503,37.4226514386435,17
-122.0848020460801,37.42261133916315,17
-122.0847882750515,37.42256395055121,17
-122.0848938459612,37.42257124044786,17 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Building 41</name>
<visibility>0</visibility>
<styleUrl>#transBluePoly</styleUrl>
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -122.0857412771483,37.42227033155257,17
-122.0858169768481,37.42231408832346,17
-122.085852582875,37.42230337469744,17
-122.0858799945639,37.42225686138789,17
-122.0858860101409,37.4222311076138,17
-122.0858069157288,37.42220250173855,17
-122.0858379542653,37.42214027058678,17
-122.0856732640519,37.42208690214408,17
-122.0856022926407,37.42214885429042,17
-122.0855902778436,37.422128290487,17
-122.0855841672237,37.42208171967246,17
-122.0854852065741,37.42210455874995,17
-122.0855067264352,37.42214267949824,17
-122.0854430712915,37.42212783846172,17
-122.0850990714904,37.42251282407603,17
-122.0856769818632,37.42281815323651,17
-122.0860162273783,37.42244918858722,17
-122.0857260327004,37.42229239604253,17
-122.0857412771483,37.42227033155257,17 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Building 42</name>
<visibility>0</visibility>
<styleUrl>#transGreenPoly</styleUrl>
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -122.0857862287242,37.42136208886969,25
-122.0857312990603,37.42136935989481,25
-122.0857312992918,37.42140934910903,25
-122.0856077073679,37.42138390166565,25
-122.0855802426516,37.42137299550869,25
-122.0852186221971,37.42137299504316,25
-122.0852277765639,37.42161656508265,25
-122.0852598189347,37.42160565894403,25
-122.0852598185499,37.42168200156,25
-122.0852369311478,37.42170017860346,25
-122.0852643957828,37.42176197982575,25
-122.0853239032746,37.42176198013907,25
-122.0853559454324,37.421852864452,25
-122.0854108752463,37.42188921823734,25
-122.0854795379357,37.42189285337048,25
-122.0855436229819,37.42188921797546,25
-122.0856260178042,37.42186013499926,25
-122.085937287963,37.42186013453605,25
-122.0859428718666,37.42160898590042,25
-122.0859655469861,37.42157992759144,25
-122.0858640462341,37.42147115002957,25
-122.0858548911215,37.42140571326184,25
-122.0858091162768,37.4214057134039,25
-122.0857862287242,37.42136208886969,25 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Building 43</name>
<visibility>0</visibility>
<styleUrl>#transYellowPoly</styleUrl>
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -122.0844371128284,37.42177253003091,19
-122.0845118855746,37.42191111542896,19
-122.0850470999805,37.42178755121535,19
-122.0850719913391,37.42143663023161,19
-122.084916406232,37.42137237822116,19
-122.0842193868167,37.42137237801626,19
-122.08421938659,37.42147617161496,19
-122.0838086419991,37.4214613409357,19
-122.0837899728564,37.42131306410796,19
-122.0832796534698,37.42129328840593,19
-122.0832609819207,37.42139213944298,19
-122.0829373621737,37.42137236399876,19
-122.0829062425667,37.42151569778871,19
-122.0828502269665,37.42176282576465,19
-122.0829435788635,37.42176776969635,19
-122.083217411188,37.42179248552686,19
-122.0835970430103,37.4217480074456,19
-122.0839455556771,37.42169364237603,19
-122.0840077894637,37.42176283815853,19
-122.084113587521,37.42174801104392,19
-122.0840762473784,37.42171341292375,19
-122.0841447047739,37.42167881534569,19
-122.084144704223,37.42181720660197,19
-122.0842503333074,37.4218170700446,19
-122.0844371128284,37.42177253003091,19 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Folder>
<Folder>
<name>Extruded Polygon</name>
<description>A simple way to model a building</description>
<Placemark>
<name>The Pentagon</name>
<LookAt>
<longitude>-77.05580139178142</longitude>
<latitude>38.870832443487</latitude>
<heading>59.88865561738225</heading>
<tilt>48.09646074797388</tilt>
<range>742.0552506670548</range>
</LookAt>
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -77.05788457660967,38.87253259892824,100
-77.05465973756702,38.87291016281703,100
-77.05315536854791,38.87053267794386,100
-77.05552622493516,38.868757801256,100
-77.05844056290393,38.86996206506943,100
-77.05788457660967,38.87253259892824,100 </coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates> -77.05668055019126,38.87154239798456,100
-77.05542625960818,38.87167890344077,100
-77.05485125901024,38.87076535397792,100
-77.05577677433152,38.87008686581446,100
-77.05691162017543,38.87054446963351,100
-77.05668055019126,38.87154239798456,100 </coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</Placemark>
</Folder>
<Folder>
<name>Absolute and Relative</name>
<visibility>0</visibility>
<description>Four structures whose roofs meet exactly. Turn on/off
terrain to see the difference between relative and absolute
positioning.</description>
<LookAt>
<longitude>-112.3348969157552</longitude>
<latitude>36.14845533214919</latitude>
<altitude>0</altitude>
<heading>-86.91235037566909</heading>
<tilt>49.30695423894192</tilt>
<range>990.6761201087104</range>
</LookAt>
<Placemark>
<name>Absolute</name>
<visibility>0</visibility>
<styleUrl>#transBluePoly</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -112.3372510731295,36.14888505105317,1784
-112.3356128688403,36.14781540589019,1784
-112.3368169371048,36.14658677734382,1784
-112.3384408457543,36.14762778914076,1784
-112.3372510731295,36.14888505105317,1784 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Absolute Extruded</name>
<visibility>0</visibility>
<styleUrl>#transRedPoly</styleUrl>
<Polygon>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -112.3396586818843,36.14637618647505,1784
-112.3380597654315,36.14531751871353,1784
-112.3368254237788,36.14659596244607,1784
-112.3384555043203,36.14762621763982,1784
-112.3396586818843,36.14637618647505,1784 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Relative</name>
<visibility>0</visibility>
<LookAt>
<longitude>-112.3350152490417</longitude>
<latitude>36.14943123077423</latitude>
<altitude>0</altitude>
<heading>-118.9214100848499</heading>
<tilt>37.92486261093203</tilt>
<range>345.5169113679813</range>
</LookAt>
<styleUrl>#transGreenPoly</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -112.3349463145932,36.14988705767721,100
-112.3354019540677,36.14941108398372,100
-112.3344428289146,36.14878490381308,100
-112.3331289492913,36.14780840132443,100
-112.3317019516947,36.14680755678357,100
-112.331131440106,36.1474173426228,100
-112.332616324338,36.14845453364654,100
-112.3339876620524,36.14926570522069,100
-112.3349463145932,36.14988705767721,100 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Relative Extruded</name>
<visibility>0</visibility>
<LookAt>
<longitude>-112.3351587892382</longitude>
<latitude>36.14979247129029</latitude>
<altitude>0</altitude>
<heading>-55.42811560891606</heading>
<tilt>56.10280503739589</tilt>
<range>401.0997279712519</range>
</LookAt>
<styleUrl>#transYellowPoly</styleUrl>
<Polygon>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates> -112.3348783983763,36.1514008468736,100
-112.3372535345629,36.14888517553886,100
-112.3356068927954,36.14781612679284,100
-112.3350034807972,36.14846469024177,100
-112.3358353861232,36.1489624162954,100
-112.3345888301373,36.15026229372507,100
-112.3337937856278,36.14978096026463,100
-112.3331798208424,36.1504472788618,100
-112.3348783983763,36.1514008468736,100 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Folder>
</Folder>
</Document>
</kml>

View File

@@ -0,0 +1,153 @@
<?php
/**
* @file
* openlayers_test_example_feature.features.field.inc
*/
/**
* Implements hook_field_default_fields().
*/
function openlayers_test_example_feature_field_default_fields() {
$fields = array();
// Exported field: 'node-openlayers_example_content-body'
$fields['node-openlayers_example_content-body'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(
0 => 'node',
),
'field_name' => 'body',
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'module' => 'text',
'settings' => array(),
'translatable' => '0',
'type' => 'text_with_summary',
),
'field_instance' => array(
'bundle' => 'openlayers_example_content',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => '0',
),
'teaser' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(
'trim_length' => 600,
),
'type' => 'text_summary_or_trimmed',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'body',
'label' => 'Body',
'required' => FALSE,
'settings' => array(
'display_summary' => TRUE,
'text_processing' => 1,
'user_register_form' => FALSE,
),
'widget' => array(
'module' => 'text',
'settings' => array(
'rows' => 20,
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => '2',
),
),
);
// Exported field: 'node-openlayers_example_content-field_openlayers_example_input'
$fields['node-openlayers_example_content-field_openlayers_example_input'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_openlayers_example_input',
'foreign keys' => array(),
'indexes' => array(),
'module' => 'geofield',
'settings' => array(),
'translatable' => '0',
'type' => 'geofield',
),
'field_instance' => array(
'bundle' => 'openlayers_example_content',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'geofield',
'settings' => array(
'data' => 'full',
),
'type' => 'geofield_wkt',
'weight' => '1',
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_openlayers_example_input',
'label' => 'OpenLayers Example Geofield Input',
'required' => 0,
'settings' => array(
'local_solr' => array(
'enabled' => FALSE,
'lat_field' => 'lat',
'lng_field' => 'lng',
),
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'geofield',
'settings' => array(
'data_storage' => 'collection',
'openlayers_map' => 'geofield_widget_map',
),
'type' => 'geofield_openlayers',
'weight' => '1',
),
),
);
// Translatables
// Included for use with string extractors like potx.
t('Body');
t('OpenLayers Example Geofield Input');
return $fields;
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* @file
* openlayers_test_example_feature.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function openlayers_test_example_feature_ctools_plugin_api() {
return array("version" => "1");
}
/**
* Implements hook_views_api().
*/
function openlayers_test_example_feature_views_api() {
return array("version" => "3.0");
}
/**
* Implements hook_node_info().
*/
function openlayers_test_example_feature_node_info() {
$items = array(
'openlayers_example_content' => array(
'name' => t('OpenLayers Example Content'),
'base' => 'node_content',
'description' => t('This is an example content type for the OpenLayers module.'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
);
return $items;
}

View File

@@ -0,0 +1,31 @@
name = "OpenLayers Test Example Feature"
description = "Feature to hold OpenLayers configuration example."
core = "7.x"
package = "OpenLayers"
php = "5.2.4"
version = "7.x-2.0"
project = "openlayers_test_example_feature"
dependencies[] = "ctools"
dependencies[] = "features"
dependencies[] = "field_sql_storage"
dependencies[] = "geofield"
dependencies[] = "node"
dependencies[] = "openlayers"
dependencies[] = "text"
dependencies[] = "views"
features[ctools][] = "openlayers:openlayers_maps:1"
features[ctools][] = "views:views_default:3.0"
features[field][] = "node-openlayers_example_content-body"
features[field][] = "node-openlayers_example_content-field_openlayers_example_input"
features[node][] = "openlayers_example_content"
features[openlayers_maps][] = "openlayers_test_openlayers_example_map"
features[views_view][] = "openlayers_example_data_overlay"
features[views_view][] = "openlayers_example_map_display_view"
project status url = "http://drupal.org/project/openlayers"
; Information added by drupal.org packaging script on 2013-02-05
version = "7.x-2.0-beta3+76-dev"
core = "7.x"
project = "openlayers"
datestamp = "1360071107"

View File

@@ -0,0 +1,7 @@
<?php
/**
* @file
* Code for the OpenLayers Test Example Feature feature.
*/
include_once 'openlayers_test_example_feature.features.inc';

View File

@@ -0,0 +1,131 @@
<?php
/**
* @file
* openlayers_test_example_feature.openlayers_maps.inc
*/
/**
* Implements hook_openlayers_maps().
*/
function openlayers_test_example_feature_openlayers_maps() {
$export = array();
$openlayers_maps = new stdClass();
$openlayers_maps->disabled = FALSE; /* Edit this to true to make a default openlayers_maps disabled initially */
$openlayers_maps->api_version = 1;
$openlayers_maps->name = 'openlayers_test_openlayers_example_map';
$openlayers_maps->title = 'Example Map of Example Content';
$openlayers_maps->description = 'Example map of OpenLayers Example Content.';
$openlayers_maps->data = array(
'width' => 'auto',
'height' => '400px',
'image_path' => 'sites/all/modules/openlayers/themes/default_dark/img/',
'css_path' => 'sites/all/modules/openlayers/themes/default_dark/style.css',
'proxy_host' => 'proxy?request=',
'hide_empty_map' => 0,
'center' => array(
'initial' => array(
'centerpoint' => '0,0',
'zoom' => '2',
),
'restrict' => array(
'restrictextent' => 0,
'restrictedExtent' => '',
),
),
'behaviors' => array(
'openlayers_behavior_keyboarddefaults' => array(),
'openlayers_behavior_attribution' => array(
'seperator' => '',
),
'openlayers_behavior_layerswitcher' => array(
'ascending' => 1,
'roundedCorner' => 1,
'roundedCornerColor' => '#222222',
'maximizeDefault' => 0,
),
'openlayers_behavior_navigation' => array(
'zoomWheelEnabled' => 1,
'zoomBoxEnabled' => 1,
'documentDrag' => 0,
),
'openlayers_behavior_panzoom' => array(),
'openlayers_behavior_popup' => array(
'layers' => array(
'openlayers_example_data_overlay_openlayers_1' => 'openlayers_example_data_overlay_openlayers_1',
),
),
'openlayers_behavior_zoomtolayer' => array(
'zoomtolayer' => 'openlayers_example_data_overlay_openlayers_1',
'point_zoom_level' => '5',
'zoomtolayer_scale' => '1',
),
),
'default_layer' => 'mapquest_osm',
'layers' => array(
'mapquest_osm' => 'mapquest_osm',
'mapquest_openaerial' => 'mapquest_openaerial',
'openlayers_example_data_overlay_openlayers_1' => 'openlayers_example_data_overlay_openlayers_1',
),
'layer_weight' => array(
'geo_nodes_data_overlay_openlayers_1' => '0',
'views_geojson_example_page_1' => '0',
'openlayers_example_data_overlay_openlayers_1' => '0',
'test_geojson_direct_data' => '0',
'test_geojson_url' => '0',
'openlayers_geojson_picture_this' => '0',
'test_kml_url' => '0',
'geofield_formatter' => '0',
),
'layer_styles' => array(
'geofield_formatter' => '0',
'openlayers_geojson_picture_this' => '0',
'test_kml_url' => '0',
'test_geojson_url' => '0',
'test_geojson_direct_data' => '0',
'geo_nodes_data_overlay_openlayers_1' => '0',
'views_geojson_example_page_1' => '0',
'openlayers_example_data_overlay_openlayers_1' => 'default_marker_green',
),
'layer_styles_select' => array(
'geofield_formatter' => '0',
'openlayers_geojson_picture_this' => '0',
'test_kml_url' => '0',
'test_geojson_url' => '0',
'test_geojson_direct_data' => '0',
'geo_nodes_data_overlay_openlayers_1' => '0',
'views_geojson_example_page_1' => '0',
'openlayers_example_data_overlay_openlayers_1' => 'default_marker_gold',
),
'layer_activated' => array(
'openlayers_example_data_overlay_openlayers_1' => 'openlayers_example_data_overlay_openlayers_1',
'geofield_formatter' => 0,
'openlayers_geojson_picture_this' => 0,
'test_kml_url' => 0,
'test_geojson_url' => 0,
'test_geojson_direct_data' => 0,
'geo_nodes_data_overlay_openlayers_1' => 0,
'views_geojson_example_page_1' => 0,
),
'layer_switcher' => array(
'openlayers_example_data_overlay_openlayers_1' => 'openlayers_example_data_overlay_openlayers_1',
'geofield_formatter' => 0,
'openlayers_geojson_picture_this' => 0,
'test_kml_url' => 0,
'test_geojson_url' => 0,
'test_geojson_direct_data' => 0,
'geo_nodes_data_overlay_openlayers_1' => 0,
'views_geojson_example_page_1' => 0,
),
'projection' => '900913',
'displayProjection' => '4326',
'styles' => array(
'default' => 'default',
'select' => 'default_select',
'temporary' => 'default',
),
);
$export['openlayers_test_openlayers_example_map'] = $openlayers_maps;
return $export;
}

View File

@@ -0,0 +1,202 @@
<?php
/**
* @file
* openlayers_test_example_feature.views_default.inc
*/
/**
* Implements hook_views_default_views().
*/
function openlayers_test_example_feature_views_default_views() {
$export = array();
$view = new view;
$view->name = 'openlayers_example_data_overlay';
$view->description = 'This is an example OpenLayers Data Overlay using the OpenLayers Example Content';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'OpenLayers Example Data Overlay';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'OpenLayers Example Content';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '100';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['style_plugin'] = 'openlayers_data';
$handler->display->display_options['style_options']['data_source'] = array(
'value' => 'wkt',
'other_lat' => 'title',
'other_lon' => 'title',
'wkt' => 'field_openlayers_example_input',
'other_top' => 'title',
'other_right' => 'title',
'other_bottom' => 'title',
'other_left' => 'title',
'name_field' => 'title',
'description_field' => 'body',
'view_mode' => 'full',
);
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
$handler->display->display_options['fields']['body']['label'] = '';
$handler->display->display_options['fields']['body']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['body']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body']['alter']['external'] = 0;
$handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim'] = 0;
$handler->display->display_options['fields']['body']['alter']['html'] = 0;
$handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['body']['element_default_classes'] = 1;
$handler->display->display_options['fields']['body']['hide_empty'] = 0;
$handler->display->display_options['fields']['body']['empty_zero'] = 0;
$handler->display->display_options['fields']['body']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['body']['field_api_classes'] = 0;
/* Field: Content: OpenLayers Example Geofield Input */
$handler->display->display_options['fields']['field_openlayers_example_input']['id'] = 'field_openlayers_example_input';
$handler->display->display_options['fields']['field_openlayers_example_input']['table'] = 'field_data_field_openlayers_example_input';
$handler->display->display_options['fields']['field_openlayers_example_input']['field'] = 'field_openlayers_example_input';
$handler->display->display_options['fields']['field_openlayers_example_input']['label'] = '';
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_openlayers_example_input']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_openlayers_example_input']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_openlayers_example_input']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_openlayers_example_input']['click_sort_column'] = 'wkt';
$handler->display->display_options['fields']['field_openlayers_example_input']['settings'] = array(
'data' => 'full',
);
$handler->display->display_options['fields']['field_openlayers_example_input']['field_api_classes'] = 0;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'openlayers_example_content' => 'openlayers_example_content',
);
/* Display: OpenLayers Example Data Overlay */
$handler = $view->new_display('openlayers', 'OpenLayers Example Data Overlay', 'openlayers_1');
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$export['openlayers_example_data_overlay'] = $view;
$view = new view;
$view->name = 'openlayers_example_map_display_view';
$view->description = 'View to display the OpenLayers Example Map.';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'OpenLayers Example Map Display View';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'OpenLayers Example Map Display View';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'openlayers_map';
$handler->display->display_options['style_options']['map'] = 'openlayers_test_openlayers_example_map';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Display: OpenLayers Map Display */
$handler = $view->new_display('page', 'OpenLayers Map Display', 'page');
$handler->display->display_options['path'] = 'openlayers-example-map-display';
$export['openlayers_example_map_display_view'] = $view;
return $export;
}

View File

@@ -0,0 +1,152 @@
<?php
/**
* @file
*
* OpenLayers default packaged layers
*/
function _openlayers_test_openlayers_layers() {
$layers = array();
// KML example with URL
$layer = new stdClass();
$layer->api_version = 1;
$layer->name = 'test_kml_url';
$layer->title = t('KML Test URL');
$layer->description = t('Testing KML layer via an URL.');
$layer->data = array(
'layer_type' => 'openlayers_layer_type_kml',
'layer_handler' => 'kml',
'projection' => array('4326'),
'isBaseLayer' => FALSE,
'vector' => TRUE,
'url' => url(drupal_get_path('module', 'openlayers_test') . '/data/openlayers_test.kml'),
);
$layers[$layer->name] = $layer;
// GeoJSON example with URL
$layer = new stdClass();
$layer->api_version = 1;
$layer->name = 'test_geojson_url';
$layer->title = t('GeoJSON Test URL');
$layer->description = t('Testing GeoJSON layer via an URL.');
$layer->data = array(
'layer_type' => 'openlayers_layer_type_geojson',
'layer_handler' => 'geojson',
'projection' => array('4326'),
'isBaseLayer' => FALSE,
'vector' => TRUE,
'url' => url(drupal_get_path('module', 'openlayers_test') . '/data/openlayers_test.json'),
);
$layers[$layer->name] = $layer;
// GeoJSON example with direct data
$layer = new stdClass();
$layer->api_version = 1;
$layer->name = 'test_geojson_direct_data';
$layer->title = t('GeoJSON Test Direct Data');
$layer->description = t('Testing putting GeoJSON directly in layer.');
$layer->data = array(
'layer_type' => 'openlayers_layer_type_geojson',
'layer_handler' => 'geojson',
'projection' => array('4326'),
'isBaseLayer' => FALSE,
'vector' => TRUE,
'geojson_data' => '
{
"type": "Feature",
"properties": {
"name": "Hello, World",
"description": "This is a GeoJSON test with data directly in the layer."
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-17.578125,
-1.0546875
],
[
-37.265625,
3.1640625
],
[
-54.140625,
-3.8671875
],
[
-48.515625,
-20.0390625
],
[
-30.9375,
-24.9609375
],
[
-21.796875,
-29.1796875
],
[
-23.90625,
-36.9140625
],
[
-39.375,
-42.5390625
],
[
-51.328125,
-44.6484375
],
[
-50.625,
-52.3828125
],
[
-28.125,
-48.8671875
],
[
-13.359375,
-41.1328125
],
[
-11.953125,
-24.9609375
],
[
-28.125,
-15.8203125
],
[
-44.296875,
-11.6015625
],
[
-35.859375,
-1.7578125
],
[
-23.203125,
-9.4921875
],
[
-17.578125,
-1.0546875
]
]
]
},
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
}
}
',
);
$layers[$layer->name] = $layer;
return $layers;
}

View File

@@ -0,0 +1,250 @@
<?php
/**
* @file
* Holds testing maps
*/
/**
* Separated implementation of hook_openlayers_maps().
*/
function _openlayers_test_openlayers_maps() {
$items = array();
// Map with some behaviors
$behaviors_test = new stdClass();
$behaviors_test->api_version = 1;
$behaviors_test->name = 'behaviors_test';
$behaviors_test->title = t('Test: Behaviors');
$behaviors_test->description = t('This is a test map.');
$behaviors_test->data = array(
'projection' => '900913',
'width' => 'auto',
'default_layer' => 'osm_mapnik',
'height' => '400px',
'image_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/img/',
'css_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/style.css',
'center' => array(
'initial' => array(
'centerpoint' => '0,0',
'zoom' => '2'
)
),
'options' => array(
'displayProjection' => '4326',
'maxExtent' => openlayers_get_extent('4326'),
),
'behaviors' => array(
'openlayers_behavior_panzoombar' => array(),
'openlayers_behavior_layerswitcher' => array(),
'openlayers_behavior_attribution' => array(),
'openlayers_behavior_keyboarddefaults' => array(),
'openlayers_behavior_navigation' => array(),
'openlayers_behavior_fullscreen' => array(),
'openlayers_behavior_mouseposition' => array(),
'openlayers_behavior_dragpan' => array(),
'openlayers_behavior_boxselect' => array(),
'openlayers_behavior_permalink' => array(),
'openlayers_behavior_scaleline' => array(),
'openlayers_behavior_zoombox' => array(),
'openlayers_behavior_zoomtomaxextent' => array(),
),
'layers' => array(
'osm_mapnik' => 'osm_mapnik',
)
);
$items['behaviors_test'] = $behaviors_test;
// Map integrating a Views overlay
$openlayers_maps_cck_views = new stdClass;
$openlayers_maps_cck_views->api_version = 1;
$openlayers_maps_cck_views->name = 'openlayers_test_map_cck_views';
$openlayers_maps_cck_views->title = 'Test: OpenLayers Test Views';
$openlayers_maps_cck_views->description = 'This map tests a custom content type with a WKT field and a views layer.';
$openlayers_maps_cck_views->data = array(
'width' => 'auto',
'height' => '400px',
'image_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/img/',
'css_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/style.css',
'center' => array(
'initial' => array(
'centerpoint' => '0,0',
'zoom' => '2',
),
'restrict' => array(
'restrictextent' => 0,
'restrictedExtent' => '',
),
),
'behaviors' => array(
'openlayers_behavior_attribution' => array(),
'openlayers_behavior_keyboarddefaults' => array(),
'openlayers_behavior_layerswitcher' => array(),
'openlayers_behavior_navigation' => array(),
'openlayers_behavior_panzoombar' => array(),
'openlayers_behavior_popup' => array(),
),
'default_layer' => 'osm_mapnik',
'layers' => array(
'osm_mapnik' => 'osm_mapnik',
'openlayers_test_view_openlayers_1' => 'openlayers_test_view_openlayers_1',
),
'layer_styles' => array(),
'layer_activated' => array(
'openlayers_test_view_openlayers_1' => 'openlayers_test_view_openlayers_1',
),
'layer_switcher' => array(
'openlayers_test_view_openlayers_1' => 'openlayers_test_view_openlayers_1',
),
'projection' => '900913',
'displayProjection' => '4326',
'styles' => array(
'default' => 'default',
'select' => 'default',
'temporary' => 'default',
),
'options' => NULL,
);
// GeoJSON example
$openlayers_maps = new stdClass;
$openlayers_maps->disabled = FALSE;
$openlayers_maps->api_version = 1;
$openlayers_maps->name = 'geojson';
$openlayers_maps->title = 'Test: Using GeoJSON';
$openlayers_maps->description = 'This map uses direct data in a GeoJSON layer, as well as a URL based GeoJSON layer.';
$openlayers_maps->data = array(
'width' => 'auto',
'height' => '400px',
'image_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/img/',
'css_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/style.css',
'center' => array(
'initial' => array(
'centerpoint' => '0,0',
'zoom' => '2',
),
'restrict' => array(
'restrictextent' => 0,
'restrictedExtent' => '',
),
),
'behaviors' => array(
'openlayers_behavior_attribution' => array(),
'openlayers_behavior_keyboarddefaults' => array(),
'openlayers_behavior_layerswitcher' => array(
'ascending' => 1,
'roundedCorner' => 1,
'roundedCornerColor' => '#222222',
),
'openlayers_behavior_navigation' => array(
'zoomWheelEnabled' => 1,
'documentDrag' => 0,
),
'openlayers_behavior_panzoombar' => array(),
'openlayers_behavior_popup' => array(
'layers' => array(
'test_geojson_direct_data' => 'test_geojson_direct_data',
'test_geojson_url' => 'test_geojson_url',
),
),
),
'default_layer' => 'mapquest_osm',
'layers' => array(
'mapquest_osm' => 'mapquest_osm',
'mapquest_openaerial' => 'mapquest_openaerial',
'test_geojson_direct_data' => 'test_geojson_direct_data',
'test_geojson_url' => 'test_geojson_url',
),
'layer_styles' => array(
'test_geojson_direct_data' => 'default',
'test_geojson_url' => 'default_marker_blue',
),
'layer_styles_select' => array(
'test_geojson_direct_data' => 'default_select',
'test_geojson_url' => 'default_marker_green',
),
'projection' => '900913',
'displayProjection' => '4326',
'styles' => array(
'default' => 'default',
'select' => 'default_select',
'temporary' => 'default',
),
);
$items[$openlayers_maps->name] = $openlayers_maps;
// GeoJSON example
$openlayers_maps = new stdClass;
$openlayers_maps->disabled = FALSE;
$openlayers_maps->api_version = 1;
$openlayers_maps->name = 'kml';
$openlayers_maps->title = 'Test: Using KML';
$openlayers_maps->description = 'This map uses a KML feed.';
$openlayers_maps->data = array(
'width' => 'auto',
'height' => '400px',
'image_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/img/',
'css_path' => drupal_get_path('module', 'openlayers') . '/themes/default_dark/style.css',
'center' => array(
'initial' => array(
'centerpoint' => '-122.08452530529, 37.421872987049',
'zoom' => '17',
),
'restrict' => array(
'restrictextent' => 0,
'restrictedExtent' => '',
),
),
'behaviors' => array(
'openlayers_behavior_attribution' => array(),
'openlayers_behavior_keyboarddefaults' => array(),
'openlayers_behavior_layerswitcher' => array(
'ascending' => 1,
'roundedCorner' => 1,
'roundedCornerColor' => '#222222',
),
'openlayers_behavior_navigation' => array(
'zoomWheelEnabled' => 1,
'documentDrag' => 0,
),
'openlayers_behavior_panzoombar' => array(),
'openlayers_behavior_popup' => array(
'layers' => array(
'test_geojson_direct_data' => 'test_kml_url',
),
),
),
'default_layer' => 'mapquest_osm',
'layers' => array(
'mapquest_osm' => 'mapquest_osm',
'mapquest_openaerial' => 'mapquest_openaerial',
'test_kml_url' => 'test_kml_url',
),
'layer_styles' => array(
'test_kml_url' => 'default',
),
'layer_styles_select' => array(
'test_kml_url' => 'default_select',
),
'projection' => '900913',
'displayProjection' => '4326',
'styles' => array(
'default' => 'default',
'select' => 'default_select',
'temporary' => 'default',
),
);
$items[$openlayers_maps->name] = $openlayers_maps;
// We only want to provide the Views/CCK map if the
// modules are installed and the view is provide
if (module_exists('content') && module_exists('views') && module_exists('content_copy')) {
$layers = openlayers_layers_load();
if (!empty($layers['openlayers_test_view_openlayers_1'])) {
$items['openlayers_test_map_cck_views'] = $openlayers_maps_cck_views;
}
}
// Return maps
return $items;
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* @file
* Pages for test module
*/
/**
* Callback for OpenLayers Test Show Maps Page
*/
function openlayers_test_show_maps() {
$output = '';
// Render all maps
$maps = openlayers_maps();
foreach ($maps as $name => $map) {
$output .= '
<h3>' . $map->title . '</h3>
' . openlayers_render_map($map) . '
';
}
/*
// Create collapsed fieldset
//$render_fieldset = openlayers_render_map();
$element = array(
'#value' => $render_fieldset['themed'],
'#title' => t('Fieldset Example'),
'#collapsed' => TRUE,
'#collapsible' => TRUE,
);
$fieldset = theme_fieldset($element);
*/
return $output;
}
/**
* Callback for OpenLayers Test JS Page
*/
function openlayers_test_js() {
drupal_add_js(drupal_get_path('module', 'openlayers_test') . '/js/qunit/qunit.js');
drupal_add_css(drupal_get_path('module', 'openlayers_test') . '/js/qunit/qunit.css');
drupal_add_js(drupal_get_path('module', 'openlayers_test') . '/js/openlayers_test.js');
$output = '';
// Display QUnit stuff
$output .= '
<h1 id="qunit-header">OpenLayers QUnit Tests</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
';
// Render only specific maps
$maps = array('default', 'behaviors_test');
foreach ($maps as $name => $map) {
$output .= '
' . openlayers_render_map($map) . '
';
}
return $output;
}

View File

@@ -0,0 +1,178 @@
<?php
/**
* @file
* Holds Openlayers test views
*/
/**
* Implements hook_views_default_views().
*/
function _openlayers_test_views_default_views() {
// Only provide view if everything is already setup properly
if (module_exists('content') && module_exists('content_copy')) {
$field = content_fields('field_openlayers_test_wkt', 'openlayers_test_type');
if (!empty($field)) {
$view = new view;
$view->name = 'openlayers_test_view';
$view->description = 'OpenLayers Test View';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'OpenLayers Test View Default Display', 'default');
$handler->override_option('fields', array(
'field_openlayers_test_wkt_openlayers_wkt' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'openlayers_wkt',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_openlayers_test_wkt_openlayers_wkt',
'table' => 'node_data_field_openlayers_test_wkt',
'field' => 'field_openlayers_test_wkt_openlayers_wkt',
'relationship' => 'none',
),
'teaser' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'teaser',
'table' => 'node_revisions',
'field' => 'teaser',
'relationship' => 'none',
),
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'openlayers_test_type' => 'openlayers_test_type',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', 'OpenLayers Test View Layer');
$handler->override_option('items_per_page', 200);
$handler->override_option('style_plugin', 'openlayers_data');
$handler->override_option('style_options', array(
'grouping' => '',
'data_source' => array(
'value' => array(
'openlayers_wkt' => 'openlayers_wkt',
),
'other_lat' => 'field_openlayers_test_wkt_openlayers_wkt',
'other_lon' => 'field_openlayers_test_wkt_openlayers_wkt',
'openlayers_wkt' => 'field_openlayers_test_wkt_openlayers_wkt',
'other_top' => 'field_openlayers_test_wkt_openlayers_wkt',
'other_right' => 'field_openlayers_test_wkt_openlayers_wkt',
'other_bottom' => 'field_openlayers_test_wkt_openlayers_wkt',
'other_left' => 'field_openlayers_test_wkt_openlayers_wkt',
'name_field' => 'title',
'description_field' => 'teaser',
),
));
$handler = $view->new_display('openlayers', 'OpenLayers Test View OpenLayers Display', 'openlayers_1');
$handler->override_option('row_plugin', '');
$handler->override_option('displays', array());
// Return
$views['openlayers_test_view'] = $view;
return $views;
}
}
}

View File

@@ -0,0 +1,46 @@
/**
* @file
* OpenLayers JS test file, utilizing QUnit.
*/
(function ($) {
$(document).ready(function() {
module('Utility Functions');
// Test the relate path function
test('Testing Drupal.openlayers.relatePath correctness', function() {
var root_path = '/this/is/path.js';
var domain_path = 'http://www.test.com/this/is/path.js';
var relative_path = 'this/is/path.js';
equals(root_path,
Drupal.openlayers.relatePath(root_path, 'foo'), 'Root path is correct' );
equals(domain_path,
Drupal.openlayers.relatePath(domain_path, 'foo'), 'Domain path is correct' );
equals('http://foo.com/this/is/path.js',
Drupal.openlayers.relatePath(relative_path, 'http://foo.com/'), 'Relative path is correct' )});
// Test the object from feature function
test('Testing object_from_feature correctness', function() {
var latlonobject = {lat: 5, lon: 10};
var llobj = Drupal.openlayers.objectFromFeature(latlonobject);
equals(10, llobj.geometry.x, 'Latitude is correct');
equals(5, llobj.geometry.y, 'Latitude is correct');
var wktobject = {wkt: 'POINT(50 40)'};
var wktobj = Drupal.openlayers.objectFromFeature(wktobject);
equals(50, wktobj.geometry.x, 'Latitude is correct');
equals(40, wktobj.geometry.y, 'Latitude is correct');
});
module('Rendering');
test('Testing basic rendering', function() {
// Remove stop_render
$('.openlayers-map:not(.openlayers-processed)').each(function() {
var map_id = $(this).attr('id');
Drupal.settings.openlayers.maps[map_id].stop_render = false;
Drupal.attachBehaviors($('body'), Drupal.settings);
ok($('#' + map_id).children().hasClass('olMapViewport'), 'Map ' + map_id + ' rendered');
});
});
});
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,119 @@
ol#qunit-tests {
font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
margin:0;
padding:0;
list-style-position:inside;
font-size: smaller;
}
ol#qunit-tests li{
padding:0.4em 0.5em 0.4em 2.5em;
border-bottom:1px solid #fff;
font-size:small;
list-style-position:inside;
}
ol#qunit-tests li ol{
box-shadow: inset 0px 2px 13px #999;
-moz-box-shadow: inset 0px 2px 13px #999;
-webkit-box-shadow: inset 0px 2px 13px #999;
margin-top:0.5em;
margin-left:0;
padding:0.5em;
background-color:#fff;
border-radius:15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
}
ol#qunit-tests li li{
border-bottom:none;
margin:0.5em;
background-color:#fff;
list-style-position: inside;
padding:0.4em 0.5em 0.4em 0.5em;
}
ol#qunit-tests li li.pass{
border-left:26px solid #C6E746;
background-color:#fff;
color:#5E740B;
}
ol#qunit-tests li li.fail{
border-left:26px solid #EE5757;
background-color:#fff;
color:#710909;
}
ol#qunit-tests li.pass{
background-color:#D2E0E6;
color:#528CE0;
}
ol#qunit-tests li.fail{
background-color:#EE5757;
color:#000;
}
ol#qunit-tests li strong {
cursor:pointer;
}
h1#qunit-header{
background-color:#0d3349;
margin:0;
padding:0.5em 0 0.5em 1em;
color:#fff;
font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
border-top-right-radius:15px;
border-top-left-radius:15px;
-moz-border-radius-topright:15px;
-moz-border-radius-topleft:15px;
-webkit-border-top-right-radius:15px;
-webkit-border-top-left-radius:15px;
text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
}
h2#qunit-banner{
font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
height:5px;
margin:0;
padding:0;
}
h2#qunit-banner.qunit-pass{
background-color:#C6E746;
}
h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar {
background-color:#EE5757;
}
#qunit-testrunner-toolbar {
font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
padding:0;
/*width:80%;*/
padding:0em 0 0.5em 2em;
font-size: small;
}
h2#qunit-userAgent {
font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
background-color:#2b81af;
margin:0;
padding:0;
color:#fff;
font-size: small;
padding:0.5em 0 0.5em 2.5em;
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
}
p#qunit-testresult{
font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
margin:0;
font-size: small;
color:#2b81af;
border-bottom-right-radius:15px;
border-bottom-left-radius:15px;
-moz-border-radius-bottomright:15px;
-moz-border-radius-bottomleft:15px;
-webkit-border-bottom-right-radius:15px;
-webkit-border-bottom-left-radius:15px;
background-color:#D2E0E6;
padding:0.5em 0.5em 0.5em 2.5em;
}
strong b.fail{
color:#710909;
}
strong b.pass{
color:#5E740B;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,384 @@
<?php
/**
* @file
* Main OpenLayers Test file
*
* This file contains the tests for the openlayers
* module. Please note that since this module
* depends heavily on Javascript, these tests are
* limited in ensuring that the OpenLayers module
* functions 100% correctly.
*
* For reference, @see:
* http://api.drupal.org/api/drupal/modules--simpletest--drupal_web_test_case.php/class/DrupalWebTestCase/7
*
* @ingroup openlayers
*/
/**
* Test the OpenLayers core functionality.
*/
class OpenLayersCore extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers Core',
'description' => 'Tests OpenLayers core functions.',
'group' => 'OpenLayers',
);
}
function setUp() {
// Install modules
parent::setUp('openlayers', 'ctools', 'openlayers_ui', 'openlayers_test');
}
/**
* Test openlayers_include
*/
function testInclude() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// Go to test page and ensure includes happened.
$this->drupalGet('admin/structure/openlayers/test');
$this->assertRaw('openlayers.css', t('The OpenLayers CSS file was included'));
$this->assertRaw('openlayers.js', t('The OpenLayers JS file was included'));
}
/**
* Test map rendering
*/
function testRender() {
$rendered = openlayers_render_map();
//$this->verbose('Map output: ' . var_export($rendered, TRUE));
// Check output
$this->assertTrue((stripos($rendered, 'default') !== FALSE), t('Default name found'));
$this->assertTrue((stripos($rendered, 'id="openlayers-container-openlayers-map') !== FALSE),
t('Container ID found'));
$this->assertTrue((stripos($rendered, 'id="openlayers-map') !== FALSE),
t('Map ID found'));
$this->assertTrue((stripos($rendered, 'class="openlayers-map') !== FALSE),
t('Map Class found'));
}
}
/**
* Test OpenLayers basic UI
*/
class OpenLayersUI extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers UI',
'description' => 'Tests OpenLayers basic UI.',
'group' => 'OpenLayers',
);
}
function setUp() {
// Install modules
parent::setUp('openlayers', 'ctools', 'openlayers_ui', 'openlayers_test');
}
/**
* Ensure that the source can be updated
*/
function testSourceChange() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// Update source settings
$new_openlayers_source = 'http://openlayers.org/nightly/OpenLayers.js';
$openlayers_settings = array('openlayers_source' => $new_openlayers_source);
$this->drupalPost('admin/structure/openlayers', $openlayers_settings, t('Save configuration'));
// Go to map page
$this->drupalGet('admin/structure/openlayers');
$this->assertResponse(200, t('User can reach the settings page.'));
// Check that the new source change is represented
$this->drupalGet('admin/structure/openlayers');
$this->assertRaw($new_openlayers_source, t('The OpenLayers source was changed'));
}
}
/**
* Test OpenLayers maps.
*/
class OpenLayersMaps extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers Maps',
'description' => 'Tests the OpenLayers maps system.',
'group' => 'OpenLayers',
);
}
function setUp() {
// Install modules
parent::setUp('openlayers', 'ctools', 'openlayers_ui', 'openlayers_test');
}
/**
* Ensure that the map shows up in the interface
*/
function testOpenLayersMaps() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// Go to map page
$this->drupalGet('admin/structure/openlayers/maps');
$this->assertResponse(200, t('User can reach map list.'));
// Ensure that the default test is listed
$this->assertText(t('Default Map'),
t('Assert that the default map\'s title appears.'));
// Maps
$this->drupalGet('admin/structure/openlayers/maps/default/export');
$this->assertResponse(200, t('User can reach default map export page.'));
$this->drupalGet('admin/structure/openlayers/maps/clone/default');
$this->assertResponse(200, t('User can reach default map clone page.'));
$this->drupalGet('admin/structure/openlayers/maps/add');
$this->assertResponse(200, t('User can reach map add page.'));
}
/**
* Add a new map
*/
function testMapAdd() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// Add new map. Add scaleline so we can look for it later
$map_settings = array(
'name' => 'testing_map',
'title' => t('Testing Map'),
'description' => t('Testing Map description.'),
'behaviors[openlayers_behavior_scaleline][enabled]' => TRUE,
);
$this->drupalPost('admin/structure/openlayers/maps/add', $map_settings, t('Save'));
$this->assertText(t('Map saved.'), t('The map was successfully saved.'));
// Remove Map
$this->drupalPost('admin/structure/openlayers/maps/list/' . $map_settings['name'] . '/delete',
array(), t('Delete'));
$this->assertText('Map was deleted.', t('Map removed succesfully.'));
}
}
/**
* Test OpenLayers styles.
*/
class OpenLayersStyles extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers Styles',
'description' => 'Tests the OpenLayers Styles system.',
'group' => 'OpenLayers',
);
}
function setUp() {
// Install modules
parent::setUp('openlayers', 'ctools', 'openlayers_ui', 'openlayers_test');
}
function testOpenLayersStyles() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// New style.
$new_style = array(
'name' => 'unitstyle',
'title' => 'Unit Style',
'description' => 'Unit Style for Drupal',
);
// Check basic navigation.
$this->drupalGet('admin/structure/openlayers/styles/list/default/export');
$this->assertResponse(200, t('User can reach default style export page.'));
$this->drupalGet('admin/structure/openlayers/styles/add');
$this->assertResponse(200, t('User can reach style add page.'));
// Add new style.
$this->drupalPost('admin/structure/openlayers/styles/add', $new_style, t('Save'));
$this->assertText(t('Style saved.'),
t('The style was successfully saved.'));
// Test that the style shows up in the style list.
$this->drupalGet('admin/structure/openlayers/styles');
$this->assertRaw(t('Unit Style'),
t('A new style has been added by the test'));
// Test removing style.
$this->drupalPost('admin/structure/openlayers/styles/list/unitstyle/delete',
array(), t('Delete'));
$this->assertText('Style was deleted.',
t('Style removed succesfully.'));
}
}
/**
* Test OpenLayers layers.
*/
class OpenLayersLayers extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers Layers',
'description' => 'Tests the OpenLayers Layers system.',
'group' => 'OpenLayers',
);
}
function setUp() {
// Install modules
parent::setUp('openlayers', 'ctools', 'openlayers_ui', 'openlayers_test');
}
function testOpenLayersLayers() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// New layers to add
$layer_inputs = array(
'openlayers_layer_type_osm' => array(
'name' => 'unitlayerosm',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_xyz' => array(
'name' => 'unitlayerxyz',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_kml' => array(
'name' => 'unitlayerkml',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_wms' => array(
'name' => 'unitlayerwms',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_cloudmade' => array(
'name' => 'unitlayercloudmade',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_yahoo' => array(
'name' => 'unitlayeryahoo',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_bing' => array(
'name' => 'unitlayerbing',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
),
'openlayers_layer_type_google' => array(
'name' => 'unitlayergoogle',
'title' => 'Unit Layer',
'description' => 'Unit Layer for Drupal',
)
);
// Basic navigation.
$this->drupalGet('admin/structure/openlayers/layers/add');
$this->assertResponse(200, t('User can reach layer add page.'));
// Go through each new layer for testing.
foreach ($layer_inputs as $layer_type => $input_data) {
// Test saving new layer.
$input_data['layer_type'] = $layer_type;
$this->drupalPost('admin/structure/openlayers/layers/add',
$input_data, t('Save'));
$this->assertText(t('Layer saved.'),
t('The layer was successfully saved.'));
// Ensure that the layer shows up in the list.
$this->drupalGet('admin/structure/openlayers/layers');
$this->assertRaw($input_data['title'],
t('A new layer of layer type %type_name has been added by the test',
array('%type_name' => $layer_type)));
// Test removing layer.
$this->drupalPost('admin/structure/openlayers/layers/list/' .
$input_data['name'] . '/delete', array(), t('Delete'));
$this->assertText('Layer was deleted.',
t('Layer removed succesfully.'));
}
}
}
/**
* Test Case for Map Alters
*/
class OpenLayersMapAlters extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers Map Alters',
'description' => 'Tests the OpenLayers map alter hooks.',
'group' => 'OpenLayers',
);
}
function setUp() {
// Install modules
parent::setUp('openlayers', 'ctools', 'openlayers_ui', 'openlayers_test');
}
function testOpenLayersMapAlters() {
$user = $this->drupalCreateUser(array('administer openlayers'));
$this->drupalLogin($user);
// Styles
$this->drupalGet('admin/structure/openlayers/test');
$this->assertText(t('OpenLayers preprocess map alter hook fired.'),
t('Map preprocess alter fired correctly.'));
$this->assertText(t('OpenLayers map alter hook fired.'),
t('Map alter fired correctly.'));
}
}
/**
* OpenLayers Unit Tests
*
* Do not use t() in Unit tests.
* https://drupal.org/node/811254
*
* Unit tests do not bootstrap Drupal very
* far which makes them a bit useless if
* we are utilizing Drupal API functions.
*/
class OpenLayersUnitTests extends DrupalUnitTestCase {
public static function getInfo() {
return array(
'name' => 'OpenLayers Unit Tests',
'description' => 'Tests functions for OpenLayers.',
'group' => 'OpenLayers',
);
}
function testOpenLayersStylePath() {
module_load_include('inc', 'openlayers', 'includes/openlayers.render');
global $base_url;
// Full URL
$path = 'http://example.org/sites/all/modules/openlayers/example/${path}.jpg';
$styled_path = openlayers_style_path($path);
$this->assertTrue($styled_path === $path, 'OpenLayers Style Path function with full URL.');
// Just replacement value
$path = '${path}';
$styled_path = openlayers_style_path($path);
$this->assertTrue($styled_path === $path, 'OpenLayers Style Path function with just replacement value.');
// Relative URL
$path = 'sites/all/modules/openlayers/example/${path}.jpg';
$styled_path = openlayers_style_path($path);
$this->assertTrue($styled_path === $base_url . '/' . $path, 'OpenLayers Style Path function with relative URL.');
}
}

View File

@@ -0,0 +1,16 @@
name = "OpenLayers Tests"
description = "OpenLayers test module. There is no reason to install this."
core = 7.x
package = "OpenLayers"
dependencies[] = openlayers
hidden = TRUE
files[] = openlayers.test
files[] = includes/openlayers_test.maps.inc
files[] = includes/openlayers_test.views.inc
; Information added by drupal.org packaging script on 2013-02-05
version = "7.x-2.0-beta3+76-dev"
core = "7.x"
project = "openlayers"
datestamp = "1360071107"

View File

@@ -0,0 +1,191 @@
<?php
/**
* @file
* This file holds the functions for the installing
* and enabling of the openlayers_test module.
*
* @ingroup openlayers
*/
/**
* Implementation of hook_install().
*/
function openlayers_test_install() {
// Create test content type to be used with CCK and Views.
// Only do this if CCK and Views are installed.
if (module_exists('content') && module_exists('views') && module_exists('content_copy')) {
// Create content type first
$node_type = array(
'type' => 'openlayers_test_type',
'name' => st('OpenLayers Test Type'),
'module' => 'node',
'description' => st('This is a test content type for OpenLayers.'),
'custom' => TRUE,
'modified' => TRUE,
'locked' => TRUE,
);
$node_type = (object)_node_type_set_defaults($node_type);
node_type_save($node_type);
// Default to not promoted.
variable_set('node_options_openlayers_test_type', array('status'));
// The import process of CCK is not simply calling a function,
// so we just feed the submit function the correct values
module_load_include('inc', 'node', 'content_types.inc');
module_load_include('inc', 'content', 'includes/content.admin.inc');
module_load_include('inc', 'content', 'includes/content.crud');
module_load_include('module', 'content_copy', 'content_copy');
// Leverage macro making function
$GLOBALS['content_copy']['submissions'] = _openlayers_test_content_definition();
$macro = content_copy_get_macro();
// Make form array
$form = array();
$form_state = array(
'values' => array(
'type_name' => 'openlayers_test_type',
'macro' => $macro,
),
);
// Call submit function
content_copy_import_form_submit($form, $form_state);
}
}
/**
* Implementation of hook_uninstall().
*/
function openlayers_test_uninstall() {
// Remove any added data (check for function)
if (function_exists('node_type_delete')) {
node_type_delete('openlayers_test_type');
}
// Get module variables
$variables = db_query("SELECT v.name FROM {variable} AS v WHERE v.name LIKE ':pattern'",
array(':pattern' => db_like('openlayers_test_') . '%'))->fetchAll();
// Remove variables
foreach ($variables as $v) {
variable_del($v);
}
}
/**
* Get content type definition with fields.
*
* Retireives content type definition and fields
* as exported from CCK.
*/
function _openlayers_test_content_definition() {
$content['type'] = array(
'name' => 'OpenLayers Test Type',
'type' => 'openlayers_test_type',
'description' => 'This is a content type for testing OpenLayers functionality.',
'title_label' => 'Title',
'body_label' => 'Body',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array(
'status' => TRUE,
'promote' => FALSE,
'sticky' => FALSE,
'revision' => FALSE,
),
'old_type' => 'openlayers_test_type',
'orig_type' => 'openlayers_test_type',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '1',
'comment' => 2,
'comment_default_mode' => 4,
'comment_default_order' => 1,
'comment_default_per_page' => 50,
'comment_controls' => 3,
'comment_anonymous' => 0,
'comment_subject_field' => 1,
'comment_preview' => 1,
'comment_form_location' => 0,
);
$content['fields'] = array(
0 =>
array(
'label' => 'OpenLayers Test WKT',
'field_name' => 'field_openlayers_test_wkt',
'type' => 'openlayers_wkt',
'widget_type' => 'openlayers_wkt_widget',
'change' => 'Change basic information',
'weight' => '31',
'openlayers_cck_map' => 'default',
'description' => 'This is some help text for this field.',
'default_value' =>
array(
0 =>
array(
'openlayers_wkt' => '',
),
),
'default_value_php' => '',
'default_value_widget' => NULL,
'group' => FALSE,
'required' => 0,
'multiple' => '0',
'openlayers_cck_feature_types' =>
array(
'point' => 'point',
'path' => 'path',
'polygon' => 'polygon',
),
'op' => 'Save field settings',
'module' => 'openlayers_cck',
'widget_module' => 'openlayers_cck',
'columns' =>
array(
'openlayers_wkt' =>
array(
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
'sortable' => TRUE,
'views' => TRUE,
),
),
'display_settings' =>
array(
'label' =>
array(
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array(
'format' => 'default',
'exclude' => 0,
),
'full' =>
array(
'format' => 'default',
'exclude' => 0,
),
4 =>
array(
'format' => 'default',
'exclude' => 0,
),
),
),
);
$content['extra'] = array(
'title' => '-5',
'body_field' => '0',
'revision_information' => '20',
'comment_settings' => '30',
'menu' => '-2',
);
return $content;
}

View File

@@ -0,0 +1,126 @@
<?php
/**
* @file
* Main OpenLayers Test Module file
*
* This file contains a test module to help with automated
* testing.
*
* @ingroup openlayers
*/
/**
* Implements hook_menu().
*/
function openlayers_test_menu() {
$items = array();
$items['admin/structure/openlayers/test'] = array(
'title' => 'Tests',
'description' => 'Test Pages for OpenLayers.',
'page callback' => 'openlayers_test_show_maps',
'access arguments' => array('administer openlayers'),
'file' => 'includes/openlayers_test.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 9999,
);
$items['admin/structure/openlayers/test/list'] = array(
'title' => 'Show Maps',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
$items['admin/structure/openlayers/test/js'] = array(
'title' => 'JS Tests',
'description' => 'Test Pages for OpenLayers Javascript.',
'page callback' => 'openlayers_test_js',
'access arguments' => array('administer openlayers'),
'file' => 'includes/openlayers_test.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
return $items;
}
/**
* Implements hook_ctools_plugin_api().
*/
function openlayers_test_ctools_plugin_api($module, $api) {
// Define plugins for OpenLayers plugins api
if ($module == "openlayers") {
switch ($api) {
case 'openlayers_maps':
return array('version' => 1);
case 'openlayers_layers':
return array('version' => 1);
}
}
}
/**
* Implements hook_views_api().
*/
function openlayers_test_views_api() {
return array(
'api' => 2,
);
}
/**
* Implements hook_openlayers_maps().
*/
function openlayers_test_openlayers_maps() {
module_load_include('inc', 'openlayers_test', 'includes/openlayers_test.maps');
return _openlayers_test_openlayers_maps();
}
/**
* Implements hook_openlayers_layers().
*/
function openlayers_test_openlayers_layers() {
module_load_include('inc', 'openlayers_test', 'includes/openlayers_test.layers');
return _openlayers_test_openlayers_layers();
}
/**
* Implements hook_views_default_views().
*/
function openlayers_test_views_default_views() {
module_load_include('inc', 'openlayers_test', 'includes/openlayers_test.views');
return _openlayers_test_views_default_views();
}
/**
* Impements hook_openlayers_map_preprocess_alter().
*/
function openlayers_test_openlayers_map_preprocess_alter(&$map) {
// For testing purposes, display a message on the only the Test
// page, and only once.
static $performed = FALSE;
if (!$performed && $_GET['q'] == 'admin/structure/openlayers/test') {
drupal_set_message(t('OpenLayers preprocess map alter hook fired.'));
$performed = TRUE;
}
// Add stop render for JS testing
if ($_GET['q'] == 'admin/structure/openlayers/test/js') {
$map['stop_render'] = TRUE;
}
}
/**
* Impements hook_openlayers_map_alter().
*/
function openlayers_test_openlayers_map_alter(&$map) {
// For testing purposes, display a message on the only the Test
// page, and only once.
static $performed = FALSE;
if (!$performed && $_GET['q'] == 'admin/structure/openlayers/test') {
drupal_set_message(t('OpenLayers map alter hook fired.'));
$performed = TRUE;
}
}