Re: Complex region selection

2012-03-21 Thread Richard Mason
For the state boundaries GeoCommons is your friend:
http://geocommons.com/overlays/1198

For the UI you probably want to start with an existing mapping control like
DeepEarth (http://deepearth.codeplex.com/) or the bing maps control.
They'll give you lots of stuff for free including all the zooming,
selecting, etc and a base map. Plenty of examples out there to get you
started and we can help you the rest of the way.

Richard

On Thu, Mar 22, 2012 at 1:02 PM, Chris Anderson wrote:

> Well, it's mainly used to demonstrate how much you can customise the
> ListBox control using a control template, but you've also got the advantage
> of each state being "selectable" using the functionality already provided
> by the ListBox control.  I think it's quite a neat way to go about the
> problem.
>
> I was wondering where he got the coordinates myself - would be interesting
> to know if/when you find out.  My guess is that he used some software to
> trace the state outlines and convert them to vectors somehow.
>
> Chris
>
>
> On 22 March 2012 13:33, Greg Keogh  wrote:
>
>> Chris, that’s a really weird sample, putting it in a ListBox, I mean he
>> could have put it all in a Canvas to be more realistic. However there are
>> some interesting clues inside. He has the XML state coordinates, so they
>> (and other stuff) must be publicly available somewhere (I’m still looking)
>> -- Greg 
>>
>> ** **
>>
>> ___
>> ozsilverlight mailing list
>> ozsilverlight@ozsilverlight.com
>> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>>
>>
>
> ___
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Complex region selection

2012-03-21 Thread Chris Anderson
Well, it's mainly used to demonstrate how much you can customise the
ListBox control using a control template, but you've also got the advantage
of each state being "selectable" using the functionality already provided
by the ListBox control.  I think it's quite a neat way to go about the
problem.

I was wondering where he got the coordinates myself - would be interesting
to know if/when you find out.  My guess is that he used some software to
trace the state outlines and convert them to vectors somehow.

Chris


On 22 March 2012 13:33, Greg Keogh  wrote:

> Chris, that’s a really weird sample, putting it in a ListBox, I mean he
> could have put it all in a Canvas to be more realistic. However there are
> some interesting clues inside. He has the XML state coordinates, so they
> (and other stuff) must be publicly available somewhere (I’m still looking)
> -- Greg 
>
> ** **
>
> ___
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


unit tests and exception

2012-03-21 Thread Stephen Price
Cross posting this, I'm on too many lists. Hope that doesn't offend...

I've got a unit test that is throwing an exception. (Finally got it hitting
my catch block) Its a smoke test so has a loop in it for every view. I want
it to NOT fail the test if an exception is hit. I want it to output to
debug window or whatever and continue.

Is that possible? even when I handle the exception with a try catch block ,
it still fails the test.

cheers,
Stephen
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Complex region selection

2012-03-21 Thread Greg Keogh
Chris, that's a really weird sample, putting it in a ListBox, I mean he
could have put it all in a Canvas to be more realistic. However there are
some interesting clues inside. He has the XML state coordinates, so they
(and other stuff) must be publicly available somewhere (I'm still looking)
-- Greg 

 

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Complex region selection

2012-03-21 Thread Greg Keogh
Carl, unfortunately there is no chance of using SQL Server in this app. I
have a fat book chapter
  here on
spatial data that I'd like to try out, but this isn't a chance. I'm still
web searching for some kind of control or library which might do the heavy
lifting for me -- Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Unit tests

2012-03-21 Thread Stephen Price
Hey all,

I've got a Silverlight unit test that I'm using as a smoke test to load all
of my views. Unfortunately if it hits one with an exception, the test ends.
I've got a loop that goes through each view and I'd like it to just log the
failure and continue with the next view.

Despite putting a try catch, the test still exits with a null exception on
the first bad view. Is there any way to make it actually hit my catch
rather than fail the unit test. Not sure I want the test to expect a unit
test (ie I know you can pass the test on certain exceptions).

Simplified a little to show the code structure without confusion. None of
the catch's get hit despite the exeptions happening inside the try block.

[TestMethod]
[Asynchronous]
[Description("Navigates to each view.")]public void
AllViews_NavigateToAllViewsSequentially_IsDisposed()
{

// Do some setup
// wait for shell to be loaded into testpanel
EnqueueConditional(() => IsShellLoaded);

foreach (var view in views)
{
try
{
IViewModel viewModel = null;
if (view != null)
{
if (view.Name.Contains("Summary"))
{
EnqueueCallback(() =>
{
try
{
var uri =
ResourceRegistry.GetResourceValue(view.Name);
var regionManager =
this.UnityContainer.Resolve();


regionManager.RequestNavigate(RegionNames.MainContentRegion, new
Uri(uri, UriKind.Relative), (args) =>
{
// do stuff with the view
and viewmodel
});
}
catch (Exception e)
{
Debug.WriteLine(e.Message);
}
});

EnqueueConditional(() => viewModel.IsInitialised);

EnqueueCallback(() =>
{
Debug.WriteLine("unit test for {0} viewmodel
run", viewModel.ToString());
Assert.IsTrue(viewModel.IsInitialised,
"viewmodel {0} was not initialise", viewModel.ToString());
});
}
}
}
catch (Exception e)
{
Debug.WriteLine(e.Message);
}
}

EnqueueTestComplete();
}
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Complex region selection

2012-03-21 Thread Chris Anderson
How about templating a listbox, as demonstrated here:
http://richapps.wordpress.com/2009/02/12/advanced-styling-wpf/.  That
solution is for WPF, but you could try porting it to Silverlight, and would
solve your US needs out of the box.

Chris


On 22 March 2012 12:28, Greg Keogh  wrote:

> Folks, coming soon in our app is the need for a “map region selector”
> where you click on states of America or European counties for example. ***
> *
>
> ** **
>
> I see the problem broken into a few pieces: * defining the complex regions
> and hoping that there are public sets of coordinates that define famous
> boundaries like countries and states * zooming around the map to select
> small regions (like Luxembourg) * hit testing and pleasing animations on
> mouse over and click.
>
> ** **
>
> If anyone has been through this exercise before then I’m keen to hear
> advice. I’m hoping that I won’t have to do everything manually from first
> principles with raw code and drawing primitives.
>
> ** **
>
> Cheers,
>
> Greg
>
> ___
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Complex region selection

2012-03-21 Thread Carl . Scarlett
I remember way back in SQL Server 2008 they introduced geospacial data
and queries that may make this sort of stuff easy.  There were a few
demos floating around on how to interact with this sort of data, which
I'm sure you could google up without much effort.  Unfortunately I
haven't had the joy of playing with it myself, so that's as far as I can
take you.

 

Of course, it would introduce a dependence on SQL Server to provide all
the grunt, which may not be acceptable for your solution.


Carl.

 

Carl Scarlett

Senior .NET/WPF Developer, UX Designer | Genesis

Enterprise Services | Bankwest

A: Level 5, 199 Hay Street | Perth | Western Australia | 6004

P: (08) 9449 8989

M: 0408 913 870

E: carl.scarl...@bankwest.com.au  

 

Description: cid:image001.png@01CCF7AD.AC5F6E80

 

 

 

From: ozsilverlight-boun...@ozsilverlight.com
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Greg Keogh

Sent: Thursday, 22 March 2012 9:28 AM
To: "'ozSilverlight'" 
Subject: Complex region selection

 

Folks, coming soon in our app is the need for a "map region selector"
where you click on states of America or European counties for example. 

 

I see the problem broken into a few pieces: * defining the complex
regions and hoping that there are public sets of coordinates that define
famous boundaries like countries and states * zooming around the map to
select small regions (like Luxembourg) * hit testing and pleasing
animations on mouse over and click.

 

If anyone has been through this exercise before then I'm keen to hear
advice. I'm hoping that I won't have to do everything manually from
first principles with raw code and drawing primitives.

 

Cheers,

Greg


__
This email has been scanned by the Symantec Email Security.cloud
service.
For more information please visit http://www.symanteccloud.com
__

___ 
ozsilverlight mailing list 
ozsilverlight@ozsilverlight.com 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 


___ 

This email has been scanned by the Bankwest Email Security System. 

___ 

___
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
___


__
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
__<>___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Complex region selection

2012-03-21 Thread Greg Keogh
Folks, coming soon in our app is the need for a "map region selector" where
you click on states of America or European counties for example. 

 

I see the problem broken into a few pieces: * defining the complex regions
and hoping that there are public sets of coordinates that define famous
boundaries like countries and states * zooming around the map to select
small regions (like Luxembourg) * hit testing and pleasing animations on
mouse over and click.

 

If anyone has been through this exercise before then I'm keen to hear
advice. I'm hoping that I won't have to do everything manually from first
principles with raw code and drawing primitives.

 

Cheers,

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight