art-ist / onYOURway

Plattform for Mappers - The Future is Around You
http://onYOURway.at
Other
3 stars 3 forks source link

README.md : How to deploy? #8

Closed almereyda closed 10 years ago

almereyda commented 10 years ago

How do I run development and production environments of this?

art-ist commented 10 years ago

Sorry I didn't see this before. (So many communiction channels between us ;-)

To deploy the Client = Web-Frontend take 3 simple steps:

To deploy the DB-Server/Webservice:

Cheers, Michael

almereyda commented 10 years ago

We should integrate these details into the README.

Additionally, @jaensen, could you try to run it under Mono?

jaensen commented 10 years ago

@art-ist: I just tried to install it in a local dev machine. Worked so far but some stored procedures are missing. I get an error for: "oyw.GetPlaces"

Could you please add the sources for the SP in the readme or this issue.

Thx, Daniel

art-ist commented 10 years ago

Didn't recognize, you where posting in a the closed issue. Here all the SP's added:

USE [onYOURway]
GO

CREATE Proc [oyw].[SearchSuggestions] ( @regionId int, @Lang char(2) = null ) As 
    --Declare @surroundingDistance int = 10000; --maybe get from region settings
    --Declare @bounds geography = (Select Boundary From oyw.Region Where Id = @regionId); --ToDo Convert from Linestring to Polygon
    --Declare @surrounding geography = @bounds.STBuffer(@surroundingDistance);
    --Declare @locs table (Id bigint);
    --Insert Into @locs Select Id From oyw.Location --Where Position.STIntersects(@surrounding) = 1;

    Select 'location' As Class, Name From oyw.Location --Where Id In (Select Id From @locs)
    Union 
    Select 'location' As Class, Name From oyw.LocationAlias Where Lang Is Null Or Lang = @Lang --And LocationId In (Select Id From @locs)
    Union
    Select 'street' As Class, Name From oyw.Street Where RegionId = @regionId
    Union
    Select 'tag' As Class, Name From oyw.TagName Where Name Is Not Null And (Lang Is Null Or Lang = @Lang)
    Order By Name
    ;

GO

Create Procedure oyw.GetTaxonomy (@idSet as nvarchar(4000), @lang varchar(2) = '') As
    Select oyw.GetSubTags(@idSet, @lang) For Xml Path('tags');

GO

CREATE Proc [oyw].[GetPlaces] (@RegionId int, @Lang char(2) = 'de') As
    --Declare @lang char(2) ='de';

Select (
    Select
        'Venture' As T,
        l.Id,
        l.Name,
        (
            Select a.Name, a.Lang
            From oyw.LocationAlias a
            Where a.LocationId = l.Id And (a.Lang Is Null Or a.Lang = @lang)
            For Xml Path ('Alias'), type
        ), --As Aliases,
        l.Street,
        l.HouseNumber,
        l.Zip,
        l.City,
        l.Position.ToString() As Position,
        l.Icon As Icon,
        l.[Description] As [Description],  --move to text table -> localization?
        l.Phone,        --move to links?
        (
            Select 
                t.Name, t.Lang, t.Show 
            From 
                oyw.GetTagsOf(l.Id) t
            Where  
                (t.Lang Is Null Or t.Lang = @lang)
            For Xml Path ('Tag'), type
        ), -- As Tags,
        (
            Select * From (
                Select ll.[Tag], ll.Lang, ll.Url
                From oyw.LocationLink ll
                Where ll.LocationId = l.Id And (ll.Lang Is Null Or ll.Lang = @lang)
            ) As x For Xml Path ('Link'), type
        ), -- As Links,
        l.OpeningHours
    From
        oyw.Location l
    For Xml Path('Place'), type
), 
(   
    Select 
        'Stop' As T,
        ts.Id,
        ts.Name,
        ts.Position.ToString() As Position,
        (
            Select 
                tl.Id, tl.Ref
            From
                oyw.TransportLine tl
            Where
                tl.Id In (Select * From oyw.StringToTable(ts.LineIds,', '))
            For Xml Path ('Line'), type
        ) As Lines,
        ts.LineIds
    From
        oyw.TransportStop ts
    For Xml Path('Place'), type
)
For Xml Path('Places')
;