I installed syntax highlighting for SML in Sublime Text 2, however toggling comments
doesn't work.
Does Anyone know how to implement this functionality..?
Use case:
-> some text
-> (Cmd+/)
-> (* some text *)
I copied the Comments.tmPreferences file from the Sass package I use and edited it. Copy the xml and save it in the same place you installed the sml package. The line <string>source.sml</string> tells Sublime when to use this comment style, for files that have sml syntax. Edit as needed. The line TM_COMMENT_START tells Sublime to put (* at the start of the comment and similar for TM_COMMENT_END. I commented out the uuid lines because I don't know what to put there and it seems to work without it. I did not test it on sml files, but worked on other syntaxes. I would recommend talking to the package developer to see if they would add a solution to their code.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.sml</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>(* </string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END</string>
<key>value</key>
<string> *)</string>
</dict>
</array>
</dict>
<!-- <key>uuid</key> -->
<!-- <string>7CDCE4E8-3850-4F98-A0A8-AFAE23F4F6E9</string> -->
</dict>
</plist>
Related
I'd like upload the KML file which including the PNG file on the Google Map.
The process was done normally. But I could not see the PNG data on the Google map.
Related files are as follows;
1) KML source file with text format;
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<GroundOverlay><name>ER001_Polda Balicpapan.png</name><color>88ffffff</color><Icon>
<href>ER001_Polda Balicpapan.png</href>
<viewBoundScale>0.75</viewBoundScale></Icon><LatLonBox>
<north>-.690568</north>
<south>-1.770432</south>
<east> 117.8462</east>
<west> 115.925</west>
</LatLonBox></GroundOverlay></kml>`
2) Message on the Google map
It can not display a row of data(ER001.PNG)
Please let me know that how can I display this Ground Overlay on the Google Map?
See the example in the documentation
Put the image somewhere publicly available and use the fully qualified URL.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Folder>
<name>Ground Overlays</name>
<description>Examples of ground overlays</description>
<GroundOverlay>
<name>Large-scale overlay on terrain</name>
<description>Overlay shows Mount Etna erupting
on July 13th, 2001.</description>
<Icon>
<href>https://developers.google.com/kml/documentation/images/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>
</kml>
another option would be to create a KMZ file that includes the image in the correct relative path.
I have 8000 polygons that I need to show on Google maps (certain US Zip/Postal codes -- not all of them). I have a "root" KML file that contains 10 network links that divide these zip codes up by region. In those region network links, I have more network links that divide these up by state with an average of about ~300 polygons per file. Below is an example of my KML files (shortened for example):
Root.kml:
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>regions</name>
<NetworkLink>
<Link>
<href>https://url/region0.kml</href>
<viewRefreshMode>onRegion</viewRefreshMode>
</Link>
</NetworkLink>
<NetworkLink>
<Link>
<href>https://url/region1.kml</href>
<viewRefreshMode>onRegion</viewRefreshMode>
</Link>
</NetworkLink>
<!-- additional Network Link regions -->
</Document>
</kml>
region0.kml:
?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>region0</name>
<NetworkLink>
<Region>
<LatLonAltBox>
<north>36.244860000000003</north>
<south>31.542739999999998</south>
<east>-109.49429000000001</east>
<west>-114.66689</west>
</LatLonAltBox>
<Lod>
<minLodPixels>128</minLodPixels>
<maxLodPixels>1024</maxLodPixels>
<minFadeExtent>128</minFadeExtent>
<maxFadeExtent>512</maxFadeExtent>
</Lod>
</Region>
<Link>
<href>https://url/US-AZ.kml</href>
<viewRefreshMode>onRegion</viewRefreshMode>
</Link>
</NetworkLink>
<!-- additional State KMLs for this region -->
</Document>
</kml>
US-AZ.kml:
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>US-AZ</name>
<Region>
<LatLonAltBox>
<north>36.244860000000003</north>
<south>31.542739999999998</south>
<east>-109.49429000000001</east>
<west>-114.66689</west>
</LatLonAltBox>
<Lod>
<minLodPixels>128</minLodPixels>
<maxLodPixels>1024</maxLodPixels>
<minFadeExtent>128</minFadeExtent>
<maxFadeExtent>512</maxFadeExtent>
</Lod>
</Region>
<Placemark>
<name>85208</name>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>-111.68398999999999,33.393230000000003
-111.58019,33.393160000000002
-111.58078999999999,33.404260000000001
-111.58089,33.404260000000001
-111.58078999999999,33.407719999999998
-111.59789000000001,33.407760000000003
-111.59799,33.411209999999997
-111.58909,33.411250000000003
-111.58929000000001,33.414940000000001
...
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<!-- additional Placemarks -->
</Document>
</kml>
It seems to work fine for the first region and the first state in that region (this example is US-AZ Arizona), but ignores all other regions and states. So about ~1000 polygons get rendered, but none of the other 8000 polygons get rendered.
When loading the KML in Google Earth, each of the state KML files work fine individually.
I followed the Google Keyhole examples for NetworkLink and Regions, but it doesn't seem to matter what I do that any of the other regions and network links will render.
Any ideas or a better way to show 8000 polygons using Google maps that I might be missing (and doesn't take a very long time to display on the map)?
Thanks to #Christiann Adams and #geocodezip to setting me straight.
For anyone else that is having this issue, you can only have 10 network links TOTAL through all files (as mentioned in the comments above).
How I got around it was having multiple KML layers, with no more than 10 network links per file. This seems to work for me.
Hope it helps someone else.
The following simple example illustrates a problem I am having with ALL my KML files:
Link to Simple KML Example
Here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>KML Example file</name>
<description>Simple markers</description>
<Placemark>
<name>Marker 1</name>
<description>Some stuff to put in the first info window</description>
<Point>
<coordinates>-122.1,37.4,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
It loads into Google Maps just fine. The one Placemarker Icon appears in the right location, but when I click on marker 1 in the left panel, Google Maps moves to the Atlantic Ocean just south of Ghana.
I have tried various simple and complex KML files and they all to this. If I use the My Places upload function on the same files this particular behaviour does not happen.
I am using Chrome 21 and Windows 7.
Thanks anyone!
#Mike, you are using what appears to be an older namespace:
<kml xmlns="http://earth.google.com/kml/2.0">
Perhaps you'll have better luck by instead using the definitive namespace for KML 2.2:
<kml xmlns="http://www.opengis.net/kml/2.2">
I also strongly encourage you to make use of this reputable KML Validator.
I am trying to change the style of a marker from a KML file in googlemaps. When I run the file in googleearth, the marker is different. When I run it in googlemaps it's just the same looking marker as before. Why is that happening?
Here's the beginning of the kml file:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.google.com/earth/kml/1">
<Document>
<Style id="bendigo">
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/paddle/grn-blank.png</href>
</Icon>
</IconStyle>
</Style>
<name>kml_sample1.kml</name>
<Placemark>
<name>Boat</name>
<description><![CDATA[
Boat<br />
<p>Home page: google.com</p>
]]>
</description>
<styleUrl>#bendigo</styleUrl>
<Point>
<!--run a javascript to get data points-->
<coordinates>7.666037,64.32565</coordinates>
</Point>
Your KML snippet above is missing ending tags for Placemark, Document, and kml.
Once fixed I was able to load the KML into Google Maps and it looks fine (green marker).
There was a recent update to the KML is rendered in Google Maps which may have temporarily affected this, but I am unable to be sure since it works fine for me now. If you confirm it now looks fine to you, that was probably the issue.
Since Im really new at this I will try to explain my problem as good as I can.
I have created an rss feed in flex. Since i dont really know the differens between s / mx / fx I cant figure out what the problem is. Any how. My rss feed application works fine. In the beginning of the application i have this code
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
As you can se the application starts with an s:application.
Under this i have the declaration tags
<fx:Declarations>
<mx:HTTPService id="RSSFeed" result="RSSFeed_resultHandler(event)" fault="RSSFeed_faultHandler(event)"/>
</fx:Declarations>
The problem is that I want to import this RSS feed application on another application that I created.
Thats one starts with mx:application
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="top"
backgroundColor="black"
creationComplete="init();" viewSourceURL="srcview/index.html" xmlns:s="library://ns.adobe.com/flex/spark">
Now the problem is that when i want to write the HTTP service inside the declaration types. IT wont work since the declaration tags aren't available here.
I tryied to write it witout the declaration type but get the error message
Multiple markers at this line:
-1180: Call to a possibly undefined method RSSFeed_faultHandler.
-Line breakpoint: main.mxml [line: 11]
-1180: Call to a possibly undefined method RSSFeed_resultHandler.
Any ideas ?