Try the search, it's linked to some great forums

Wednesday, March 27, 2013

Custom mapTiles and Building Maps in MapBox & TileMill

This is a quick mashup of details needed to build a custom map using;
  • Beautiful artistic map tiles from Stamen Design
  • Integrated into your own custom map tiles with TileMill
  • And built out as a completed annotated map with MapBox
This is a simple demo for building a small map of Farmer's Markets to be published in a local omnivore quarterly.

Embed code for Stamen watercolor map;

To use these tiles, just include our JavaScript alongside your favorite mapping library:
<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.2.1">
</script>

 Then, follow the instructions below for your preferred library:
OpenLayers is a hefty and featureful mapping library for use with a variety of GIS applications. View the example.

// replace "toner" here with "terrain" or "toner"
var layer = new OpenLayers.Layer.Stamen("watercolor");
var map = new OpenLayers.Map("element_id");
map.addLayer(layer);


Creating embedded code (iFrames) for custom maps

This is a description including code snippets of how to create embed code for other people to insert into their web pages.  It is based on the work we are doing with GPSVisualizer, but can be used to embed an URL that is available to an online server (like our SCNewspaperTaxi website, or a file with a URL on our Google Drive).

This is the FAQ for GPPSVisualizer:
By far the easiest solution is to put the map in an "inline frame" using the <IFRAME> tag. This creates a "window" in your page into which you can load another file (more info about IFRAMEs). The advantage of doing this is that the DIVs and margins and styles and whatnot will be completely isolated from the rest of the structure of your page; also, you don't have to edit the attributes of the <BODY> or <HTML> tags, which you would have to do if you tried to merge the GPS Visualizer code into your Web page. (The only disadvantage, and one which would only affect "power users," is that if you want to create objects that interact with the map -- for instance, a list of waypoints, or a control that will re-center the map -- those cannot be outside the IFRAME.)
Another advantage to IFRAMEs (as opposed to cutting and pasting bits of HTML into your page) is that you can place as many of them on your page as you want; because they are isolated from each other, there shouldn't be any conflicts even if all the maps have identically named parts.


Here's a sample <IFRAME> tag; the anchor in the middle will only be displayed if the browser does not support inline frames:
<iframe src="my_map.html" width="600" height="400" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
 <a href="my_map.html">Click here for the map</a>
</iframe>


Here’s an example from a Google Maps embed code:
</iframe>
<br /><small>View <a href="https://maps.google.com/maps/ms?msa=0&amp;msid=204112771159932432535.0004d6a3eb52759422f2e&amp;hl=en&amp;ie=UTF8&amp;ll=36.987644,-121.759922&amp;spn=0.271253,0.722587&amp;t=m&amp;iwloc=0004d6a410726c0cee96f&amp;source=embed" style="color:#0000FF;text-align:left">Santa Cruz Beer Map </a> in a larger map</small>


demo map URL saved in SCNewspaperTaxic.com
http://santacruznewspapertaxi.com/wp-content/uploads/2013/03/xxxxDistributionGeocoded04.html


Here’s the code for our 1st iFrame (hopefully):
<iframe src="http://santacruznewspapertaxi.com/wp-content/uploads/2013/03/xxxxDistributionGeocoded04.html" width="600" height="400" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
 <a href="http://santacruznewspapertaxi.com/wp-content/uploads/2013/03/xxxxxxDistributionGeocoded04.html">Click here for the map</a>
</iframe>



Creating embedded code (iFrames) for custom maps

This is a description including code snippets of how to create embed code for other people to insert into their web pages.  It is based on the work we are doing with GPSVisualizer, but can be used to embed an URL that is available to an online server (like our SCNewspaperTaxi website, or a file with a URL on our Google Drive).

This is the FAQ for GPPSVisualizer:
By far the easiest solution is to put the map in an "inline frame" using the <IFRAME> tag. This creates a "window" in your page into which you can load another file (more info about IFRAMEs). The advantage of doing this is that the DIVs and margins and styles and whatnot will be completely isolated from the rest of the structure of your page; also, you don't have to edit the attributes of the <BODY> or <HTML> tags, which you would have to do if you tried to merge the GPS Visualizer code into your Web page. (The only disadvantage, and one which would only affect "power users," is that if you want to create objects that interact with the map -- for instance, a list of waypoints, or a control that will re-center the map -- those cannot be outside the IFRAME.)
Another advantage to IFRAMEs (as opposed to cutting and pasting bits of HTML into your page) is that you can place as many of them on your page as you want; because they are isolated from each other, there shouldn't be any conflicts even if all the maps have identically named parts.


Here's a sample <IFRAME> tag; the anchor in the middle will only be displayed if the browser does not support inline frames:
<iframe src="my_map.html" width="600" height="400" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
 <a href="my_map.html">Click here for the map</a>
</iframe>


Here’s an example from a Google Maps embed code:
</iframe>
<br /><small>View <a href="https://maps.google.com/maps/ms?msa=0&amp;msid=204112771159932432535.0004d6a3eb52759422f2e&amp;hl=en&amp;ie=UTF8&amp;ll=36.987644,-121.759922&amp;spn=0.271253,0.722587&amp;t=m&amp;iwloc=0004d6a410726c0cee96f&amp;source=embed" style="color:#0000FF;text-align:left">Santa Cruz Beer Map </a> in a larger map</small>


demo map URL saved in SCNewspaperTaxic.com
http://santacruznewspapertaxi.com/wp-content/uploads/2013/03/xxxxDistributionGeocoded04.html


Here’s the code for our 1st iFrame (hopefully):
<iframe src="http://santacruznewspapertaxi.com/wp-content/uploads/2013/03/xxxxDistributionGeocoded04.html" width="600" height="400" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
 <a href="http://santacruznewspapertaxi.com/wp-content/uploads/2013/03/xxxxxxDistributionGeocoded04.html">Click here for the map</a>
</iframe>



Monday, March 25, 2013

Dynamic Linking of Map & Spreadsheet

The following instructions allows the map generated by GPSVisualizer to be dynamically linked with the spreadsheet that generated the original data. This means that all changes made to the 'control' spreadsheet will automatically appear in the map every time it is reloaded.  Very cool, again many thanks to: Adam Schneider.

Accessing the spreadsheet:
  1. The file should be saved as a doc.google.com/spreadsheet and formatted with lat, long and other data as necessary to generate the popups
  2. Open the file, Goto File, Publish to the Web, Start publishing now or Republish now (if the file is already published)
  3. Copy, <ctrl>C the resulting URL for pasting into the GPSVisualizer script

Building the Map:
  1. Next we go to the GPSVisualizer site and goto Make a Google map from a GPS file
  2. Paste <ctrl>V the Spreadsheet URL into the Or a URL that the map will load dynamically box in the lower left corner
  3. Expand the WayPoint Options section and changes as necessary, including;
  4. Icon:
  5. Default color marker:
  6. Synthesize name: {name}
  7. Synthesize description: Contact: {contact}<br>Phone: {phone} generates a custom form in the popup
  8. Press Draw the Map button and cross your fingers
  9. Goto the resulting map and then select the save your Google map link and save the file with an appropriate name & as a simple .HTML file
  10. That file can now be opened in your browser, and ever time you update the spreadsheet, and press Republish now the map file will update with the new data (after you Reload the map page)
 
Or a URL that the map will load dynamically: Os r 


a URL that the map will load dynamica

Thursday, March 7, 2013

Signing an emailed form

I've been receiving a lot of NDAs and other forms for which people want my 'John Hancock' signature.  Some have gone as far as insisting that I print the form, sign it and then scan it back to them! Talk about a pain.
So I found a great way to provide an image of your signature that can be placed on the form.
The form need to be in .PDF format and you need to open it in PREVIEW.  Then follow the instructions below, and you get something like this:
Sign a PDF document
You can take a picture of your handwritten signature and then add it to any PDF document.

HideTake a picture of a signature
Choose Preview > Preferences, click Signatures, and then click Create Signature.
If a signature already exists, you can choose the Create Signature command from the Signature pop-up menu in the Annotations toolbar.

Follow the instructions displayed on screen.
Make sure your signature fills the box on the left and sits on the blue baseline.
When the signature preview looks correct, click Accept.

Sign a document
Click Annotate in the toolbar, if you don’t see the annotations bar.
From the Signature pop-up menu, choose a signature.
Click the location where you want the signature to appear.
If you click a line, Preview shrinks the signature, if necessary, to fit on it.