By Soul Solutions on
Friday, 3 July 2009
I always struggle to find the full list of SQL 2008 Spatial methods for Geography when I need them so this is really just a helper post so I can find them again later but maybe it will help you also. Since they are case sensitive and don’t have intelisence I can never remember the syntax.
STArea STAsBinary STAsText STBuffer STDifference STDimension STDisjoint STDistance STEndpoint STEquals STGeometryN STGeometryType STIntersection STIntersects STIsClosed STIsEmpty STLength STNumGeometries...
Read More »
|
By Soul Solutions on
Wednesday, 1 July 2009
I noticed my old code samples around the place are a little outdated so I created this little sample based off the Bing Maps iSDK today. This is a little helper function that calculates 360 points around the location provided at the given radius in KM. The co-ordinates are quite accurate and you will notice the effects of adding a circle at different Latitudes on the Mercator map.
Full source:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
title>Circle Example Bing Mapstitle>
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2">script>
script type="text/javascript">
var map = null;
var pinid = 0;
function GetMap() {
map = new VEMap('myMap');
map.LoadMap();
map.SetZoomLevel(2);
}
function AddPolyline() {
var ll = map.GetCenter();
var shape = new VEShape(VEShapeType.Polyline, getCircle(ll, 100));
shape.SetTitle('My circle');
shape.SetDescription('This is shape number ' + pinid);
pinid++;
map.AddShape(shape);...
Read More »
|
|
|
By Soul Solutions on
Monday, 29 June 2009
It is actually very easy to display gigabytes of custom imagery on Bing Maps with fantastic results, the trick is to know what tools to use. Read on for a streamlined process for the common geo image formats using Global Mapper, SpaceBlock, Windows Azure and a few helpful tips along the way.
At Bing Map’s core is the ability to render really large images in your browser. Both the AJAX, Silverlight and Mobile versions all use a concept of a tile pyramid to make this possible and effective over the web, you can read more about the tile system in great detail here. Today we are going to look at a process I use to process custom imagery to overlay Bing maps.
In the GIS field these custom images are called raster images and come in various file formats like...
Read More »
|
|
|
By Soul Solutions on
Tuesday, 16 June 2009
For our July Girl Geek Dinner we're heading to The Hutch Bistro at New Farm and we're fortunate to have Kay Lam-Beattie as our guest speaker. So gather all of your legal/IT questions to ask Kay on the night!
About Kay:
Kay graduated from QUT in 1992 with a Bachelor of Business (Accountancy) and an honours degree in Law. To obtain more specialised skills, Kay also completed a Masters in Law concentrating on the areas of intellectual property (IP) and IT-related legal issues, as well as a Graduate Certificate in IT.
Kay has been the principal of IDEALAW (and its predecessor Legal Capital Lawyers) since 2005.
Kay’s broadly based academic qualifications places her in an ideal position not only to understand the intricacies of her specialist areas of IT and IP related law, but also technical IT and business issues. Kay also speaks conversational Japanese, having lived and worked in Japan for a number of years.
Who is invited?
If you are a geek and a girl or know of one who is willing to escort you then you are welcome and encouraged to come along. There is a technical focus with the intention of having fun and connecting with other women in IT.
Who pays for dinner? This month is not sponsored so you will have to pay for your own dinner
Where + When Date: Thursday 2nd July, 2009 Time: 7:00 pm Where: The Hutch Bistro
75 Welsby Street, New Farm
...
Read More »
|
By Soul Solutions on
Saturday, 6 June 2009
I downloaded the sample app for the Windows Live Messenger bits in preparation for our talk at Remix next week. If you haven’t played with it, the WebToolkit Sample site is a great starting place! There’s a couple of things you have to do to get them running so I thought it’d be a good idea to write these down for others.
Firstly, you’ll need an application id, so make sure you go to the Azure Services Developer Portal: https://lx.azure.microsoft.com/Cloud/Provisioning/Default.aspx and create a new project with a Live Services: Existing APIs type. Make sure you remember the domain name and URL you chose e.g. I picked remixdemo.com.au and return URL of http://remixdemo.com.au/Messenger/Default.aspx and also note down your app_id and secret key as you’ll need them to run the samples.
Make sure you add an entry in your hosts file for the domain you chose so you can run the application locally. To do this open notepad as administrator, and open the hosts file located at C:\Windows\System32\drivers\etc and create an entry like: 127.0.0.1 remixdemo.com.au
Next, I went to IIS and created a virtual directory called Messenger and pointed it to the SampleSite. To run the application I browsed to http://remixdemo.com.au/messenger/Default.aspx.
Make sure you setup your site in the web.config to use your app_id,...
Read More »
|
By Soul Solutions on
Tuesday, 2 June 2009
Fonts Setting fonts used to be a bit painful but I’ve found it quite easy in WPF. In my project I’ve copied the font files into a directory structure: \Resources\Fonts and I have a font file masanreg.ttf which contains the font called MasonSansRegular. To use the font in Xaml if just reference the path to the font and the font name prefixed with a # e.g. FontFamily="./Resources/Fonts/#MasonSansRegular"
You can also see the list in Blend under the Text section
Technorati Tags: WPF, Fonts
|
By Soul Solutions on
Sunday, 31 May 2009
I’ve been using ListBoxes with IsSynchronizedWithCurrentItem property set to True to do a lot of master/detail views recently. When using MVVM with Command Pattern it’s wasn’t immediately obvious to me how to manipulate which item was selected when I added/removed etc from the list. If I’ve just created a client record and added it to my ObservableCollection of Clients in my viewModel I can use CollectionViewSource to get a hold of the view and manipulate the current item e.g. CollectionViewSource.GetDefaultView(viewModel.Clients).MoveCurrentTo(client);
|
By Soul Solutions on
Sunday, 31 May 2009
I’ve come across a few times when I want to change the layout and contents of my screen depending on what data I have in my object. I’ve found DataTriggers really useful for this. Based on a field being populated or not is can switch out the actual template I apply to the ContentTemplate e.g.
DataTemplate x:Key="clientDetails"> ContentPresenter x:Name="clientDetailsPresenter" ContentTemplate="{StaticResource clientSummary}" Content="{TemplateBinding Content}" /> DataTemplate.Triggers> DataTrigger Binding="{BindingClient.TFN}"Value="{x:Null}"> SetterTargetName="clientDetailsPresenter" Property="ContentTemplate" Value="{StaticResource clientFullDetails}" /> DataTrigger> DataTemplate.Triggers> DataTemplate>
The other spot I find this really useful is showing different data in a list when the item is Selected.
Technorati Tags: WPF,DataTemplate,DataTrigger
...
Read More »
|