latitude longitude coordinates SQL Server and the plot on the map of the brochure

My question is basically:

How to transform the data from SQL Server and map by unfolding?

TIP: We run 11 Coldfusion, SQL Server 2000, flyer and JQuery if that helps somehow. If I need to download a javascript library, I can easily do.

I ambulance and fire events in a database with the xy coordinates. My goal is to ask them about the news and place them on a map of the brochure. All our ambulances and fire trucks have gps in them and they broadcast at all times their location and status. Here's my query to get the latest data from gps for each truck;

/*

SQL Server 2000

David Kulpanowski

June 4, 2015

Lee County EMS

*/

SELECT

DateTimeStamp

RTRIM (CallSign) AS [Guide]

RTRIM (UnitStatus) AS [UnitStatus]

Latitude

Longitude

CONVERT (VARCHAR (15), DateTimeStamp, 106) AS [CurrentDate]

CONVERT (VARCHAR (10), DateTimeStamp, 108) AS [CurrentTime]

OF FireEMSGPSDatabase

RIGHT OUTER JOIN

(

SELECT

RTrim (CallSign) AS [Ambulance]

MAX (DateTimeStamp) AS [MostRecentTime]

OF HISTORY_201506

WHERE RTRIM (CallSign) AS "LCM__".

RTRIM GROUP (CallSign)

)

LIKE [MostRecent] on DateTimeStamp = MostRecent.MostRecentTime

ORDER BY RTRIM (CallSign) CSA

;

Shown below is an example of this query output;

Call DateTimeStamp Latitude UnitStatus Longitude CurrentDate CurrentTime

2015-06-04 17:14:17.357 LCM01 QA 26.56428 - 81.87044 June 4, 2015 17:14:17

2015-06-04 17:14:17.357 LCM01 QA 26.56428 - 81.87044 June 4, 2015 17:14:17

2015-06-04 17:14:18.670 LCM02 QA 26.64074 - 81.86507 June 4, 2015 17:14:18

2015-06-04 17:14:34.420 LCM03 AR 26.64157 - 81.90973 June 4, 2015 17:14:34

2015-06-04 17:14:20.420 LCM04 TA 26.63885 - 81.94159 June 4, 2015 17:14:20

2015-06-04 17:14:21.297 LCM05 QA 26.4377 - 82.07806 June 4, 2015 17:14:21

Below is my Coldfusion page with the flyer plan added in and the cfquery with cfoutput;

<! DOCTYPE html >

< html lang = "en" >

< head >

< meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"

< meta name = "viewport" content = "width = device-width, original scale = 1.0" >

" < link rel ="stylesheet"href =" http://CDN.leafletjs.com/leaflet-0.7/leaflet.CSS "/>

" < script src =" http://CDN.leafletjs.com/leaflet-0.7.3/leaflet.js "> < / script > .

< / head >

< body >

< cfquery datasource = "GPSDatabase" name = "AmbulanceLocation" >

SELECT

DateTimeStamp

RTRIM (CallSign) AS [Guide]

RTRIM (UnitStatus) AS [UnitStatus]

Latitude

Longitude

CONVERT (VARCHAR (15), DateTimeStamp, 106) AS [CurrentDate]

CONVERT (VARCHAR (10), DateTimeStamp, 108) AS [CurrentTime]

OF FireEMSGPSDatabase

RIGHT OUTER JOIN

(

SELECT

RTrim (CallSign) AS [Ambulance]

MAX (DateTimeStamp) AS [MostRecentTime]

OF HISTORY_201506

WHERE RTRIM (CallSign) AS "LCM__".

RTRIM GROUP (CallSign)

)

LIKE [MostRecent] on DateTimeStamp = MostRecent.MostRecentTime

ORDER BY RTRIM (CallSign) CSA

< / cfquery >

< cfoutput query = "AmbulanceLocation" >

< table >

< b >

< td > #DateTimeStamp # < table >

< td > #CallSign # < table >

< td > #UnitStatus # < table >

< td > #Latitude # < table >

< td > #Longitude # < table >

< td > #CurrentDate # < table >

< td > #CurrentTime # < table >

< /tr >

< /table >

< / cfoutput >

< div id = ' map' > < / div >

< script >

var L.map = map ('plan' {Center: [26.5641867068354,-81.8704100173261], fullscreenControl: true, zoom: 12});

L.tileLayer ('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);

< /script >

< / body >

< / html >

To sum it all up - I have a SQL Server query that retrieves the last my ambulances xy coordinates. I have a Coldfusion page that has a map of the brochure and the cfquery. My question is how to plot coordinates in a flyer plan. I can't understand the middle of the book to get the results of my query in terms of the brochure.

In addition, it is a dynamic environment. Ambulances are constantly in motion. This page must be dynamic, so that the page can be updated to show the latest data.

You must create the map and tile layer prior to place markers and then run your loop inside of the script tag.

I highly recommend reading through the tutorials on the site of the brochure.  They go on these things in detail.

Quick start - leaflet guide - a JavaScript library for the mobile environment maps

Tags: ColdFusion

Similar Questions

  • Developer SQL, SQL Server and the ampersand

    Hello

    I am connected to a SQL Server database (2008) and has difficulties to get a query runs correctly in SQL Developer (3.1.07).

    Simplified example

    Select table_field
    table
    where table_field <>'This & That ';

    Expected results

    table_field
    Other stuff
    Other stuff
    Other stuff

    Actual results

    table_field
    Other stuff
    This & That
    This & That
    ....


    I can't get SQL Developer to recognize as a literal ampersand &. I tried it out in many ways, but he still thinks it's a variable.

    The query works exactly as expected in MS SQL Management Studio and Toad. Of course, I can just run it in one of these, but I would try to get this working with SQL Developer. Suggestions?

    Please let me know if I can provide further information. Thank you.

    Hello

    SQL worksheet to developers is designed for Oracle, but we allow you to execute instructions SQL Server and other databases Oracle not.
    This can lead to some quirks, such as the one you met.

    Oracle SQL * Plus uses and commercial for define substitution variables.
    Oracle SQL Developer has implemented the same concept.
    Unfortunately there is no sense when something is running on an Oracle database no.

    To work around the problem, you can run the following SQL * Plus command in SQL Developer, before your query SQL Server.
    TOGETHER TO DEFINE
    Select "Hello & Goodbye";

    The following may be useful as well.
    http://dermotoneill.blogspot.com/2010/11/workheet-hints.html
    http://dermotoneill.blogspot.com/2010/12/SQL-Server-and-Sybase-browsing.html

    Kind regards
    Dermot.
    SQL development team.

  • Different output for the same query in SQL Server and Oracle

    I have two tables table1 and table2

    -table1 has two columns c1 int and varchar c2. There are no constraints added in it. It contains data as shown below

    C1 c2
    -------------------
    d 6
    5 d
    102 g
    6%
    f 103
    5.
    501 j
    1 g
    601 n
    2 m

    -table2 has only a single column c1 int. There is no added in constraints. It contains data as shown below

    C1
    ----
    6
    1
    4
    3
    2

    now when I run below, given the query in sql server and oracle it gives me different results

    Select *.
    FROM table1
    table2 on table2.c1 = table1.c1 inner join (SELECT ROW_NUMBER() (any ORDER by ASC c1) AS c1 from table2)

    output of SQL server
    ------------------------
    C1 c2 c1
    --------------------------------
    1 g 1
    2 m 2
    3 h 3
    4 g 4
    5 d 5


    release of Oracle
    ----------------------
    C1 C2 C1
    ---------------------------------
    5 d 5
    4 g 4
    3 h 3
    1 g 1
    2 m 2


    If you notice the first column in the two outputs. It is sorted in sql server and no oracle.

    Why he behaves differently in oracle? Is there a way I can fix this problem in oracle?

    Thank you
    Jigs

    It is NOT a behavior "differently" in Oracle; you did not specify just an order that you expect of your results, so you'll get output in what order the fantasies of the database showing (ie. no guaranteed order). It is an artifact of the way the database chooses to collect the data and databases (or same sets of data within the same database) can and will most likely behave differently.

    Same SQL Server will not be guaranteed to always get your data in an orderly manner if you exclude the order by clause, even if you think that there always display the data in an orderly manner.

    Your solution is to add an order by clause, in the TWO databases, to force the order of the data output.

  • connection between sql server and java

    someone please tell me how to connect to sql server with java

    Welcome to the forums.

    The forums are a research tool very useful - by using the search box you will see near the top right.  You will find that most of the questions that ask you, which, have already been asked on the forum, so it pays to research frist - that way you get a faster response and you can find other interesting things.

    In this case, I did a quick search using SQL Server and found these threads that will probably help:

    http://supportforums.BlackBerry.com/T5/Java-development/database-connectivity-SQL-Server-2008/m-p/60...

    http://supportforums.BlackBerry.com/T5/Java-development/SQL-Server-connection-in-BB/m-p/416391#M8239...

  • Windows 7 64 bit Pro connects to SQL Server on the Windows Server 2008 R2 Standard domain

    I put upgraded to Windows 7 Professional computers to Windows XP Professional, but I have a problem with getting one of software programs management of stock that allows us to connect to our SQL Server 2008 R2 Standard Windows on new Windows 7 computers.

    Our computers are connected to a domain, and therefore SQL Server. Computers Windows XP allows each user to standard domain to connect and to connect to SQL Server via the stock management software.

    But on the standard domain of Windows 7 Pro computer users unable to connect to SQL Server, but administrator accounts of area on the same Windows 7 Pro computers can connect to SQL Server through the inventory control program.

    I have set up the alias of the server, the server name and port number via the SQL Server Client Network utility ( cliconfg.exe ) so I know this isn't the problem because it works when I'm logged on as a domain administrator.

    There seems to be something to do with permissions of user domain and Windows 7 Pro. There seems to be a change from Windows XP Pro to Windows 7 Pro that does not allow standard domain users to connect to a SQL Server. But I can't find anything about and cannot practice how to solve this problem, except to make all users, domain administrators that is obviously not a good thing to do. So basically I think I need to create a group policy that allows users to connect to SQL Server, but I have no experience in doing this and don't know where to start.

    Thank you for all that you guys help and I hope someone can give me the solution to this problem.

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Interlink with Sql server and Oracle

    Hello

    We have some data in SQL Server.
    We need to link SQL Server and Oracle Database. To make reports in Oracle Apex.

    Please someone guide me to interconnect with Oracle database

    Kind regards
    Thérèse

    Therese,
    You can find more information on gateways in this available in My Oracle Support note-

    Note to master for the Oracle Gateway (Doc ID 1083703.1) products

    Kind regards
    Mike

  • Replication of data between SQL Server and using Oracle11g materialized view.

    I have Sqlserver 2005 as my source and oracle11g as my target. I need fill out the target daily with change of the source data.
    to do this, we created a dblink between SQL Server and oracle and reproduced this table as a point of view, materialized in Oracle.
    problem that we get here is fast refresh option is not available.each day it will pick up all of the data source.
    is it possible to use Fast refresh in this scenario?

    Thanks in advance.

    Kind regards
    Balaram.

    You can try MS SQL replication.
    Configure transactional Standard of MS SQL and Oracle Publication subscriber http://msdn.microsoft.com/en-us/library/ms151738%28v=sql.90%29.aspx

  • Data type of text is not displayed using SQL Server and ASP/VBScript

    Maybe someone help me with this because I used to use PHP/MySQL, but I use for this a Classic ASP/VBScript and MS SQL Server instance and I don't know that much. The scenario is I have an old site that was designed using html tables and I do a CSS/XHTML update on Visual design. As long as we are here, there are some pages that are dynamic and use a MS Access database and we thought it's a good time to upgrade from MS SQL Server (2005, to be exact). No time/money for bringing classic ASP VBScript in ASP .NET.

    Overall, the upgrade went fairly well, especially just to create a new connection to the DB in SQL Server in Dreamweaver after all the tables and data were migrated to SQL Server. Almost everything works as it should. A problem though.

    For some reason, the data of the data type 'text' in SQL Server is not appear (or sometimes appear). I even tried to recreate the recordsets and binds fresh data and the code is more or less identical to what we had before. Anyone know what's happening, or how I can get this data to show?

    I think that there is perhaps some simple and double quotes in the text data and which could be screwing things up. I was hoping there is only a simple function that I could apply the code, but as I said, I don't know.

    Thanks in advance for any help you can provide.

    -Bill

    captcashew wrote:
    > Maybe someone help me with this because I used to use PHP/MySQL, but for this one
    > instance I use Classic ASP/VBScript and MS SQL Server and I do not know
    > that much. The scenario is that I have an old site that was designed using html
    > tables and I do a CSS/XHTML update on Visual design. As long as we
    > are there, there are some pages that are dynamic and that use a MS Access
    > database and we thought it's a good time to upgrade from MS SQL Server
    > (2005, to be exact). No time/money to classic ASP VBScript in ASP.
    > .NET so.
    >
    > Overall, the upgrade went quite well, especially just needed a new
    > connecting to the DB in SQL Server in Dreamweaver after all tables and data
    > have been migrated to SQL Server. Almost everything works as it should. One of the problems
    > If.
    >
    > For some reason, the data of the data type 'text' in SQL Server is not
    > appear (or sometimes appear). I even tried to recreate the recordsets and
    > binds fresh data and the code is more or less identical to what we had
    > front. Anyone know what's happening, or how I can get this data to show?
    >
    > I think that maybe there are single and double quotes in the text
    > data and which could be screwing things up. I was hoping that there is only a simple
    > function I could apply the code, but as I said, I don't know.
    >
    > Thanks in advance for any help you can provide.

    Your text field should be the last of your select statement, as
    its not stored in the table with the other data, its stored elsewhere,
    as a binary object, should be treated differently. Its common
    the migration of the access problem.

    If you need more of 8000 characters stick with him, otherwise use
    varchar (8000) or nvarchar (4000) If you need (limited unicode characters
    4,000 cos of the double byte characters)

    Dooza
    --
    Display guidelines
    http://www.Adobe.com/support/forums/guidelines.html
    How to ask Smart Questions
    http://www.CatB.org/ESR/FAQs/smart-questions.html

  • data replication with ODI between SQL SERVER and ORACLE

    Hello world
    First of all, I want to migrate database SQL SERVER and ORACLE DB tables.
    And then make online (synchronous) replication from SQL SERVER to ORACLE using ODI.

    I have not used before ODI.
    How to use the ODI for this?

    1. create a master repository and connect to the "topology Manager.
    2. in the topology Manager, you must configure the following
    2.1 create a data server for the Oracle under Oracle database in the physical connection
    2.2. create a database for the SQL Server database server in SQL Server in the physical connection. To do this, the jdbc for sql server driver.
    2.3 implement the logical connection and frame
    2.4 create a workrepository in the topology manager repositories tab
    3. connect to the designer and follow these steps
    3.1 create a template for the SQL Server source and reverse (import) the datastores (tables) to the model.
    3.2 the value of the model for the target of the Oracle
    3.3 create a (mapping) interface, under the table in schema define the source and then add it to the target and bind
    3.3 on the flow tab, you must set the Modules (KMs) of knowledge to perform the load. You must have imported the KMs before creating the interface.
    3.4 in IKM put 'create table traget' to 'yes '.
    4 run the interface to load data from SQL to Oracle Server

    Thank you
    Fati

  • SQL Server compact: the filemay of the damaged database.

    I get a Message at startup:

    An error occurred initializing SQL server compact: the filemay of the damaged database. The dataabase file may be damaged.  Run the repair utility to check the file daatabase.  [Database Name = \\?\\C:\program data\DDN;\Oasis2service\data\oasis2.sdf].

    Where can I find the repair utility?

    Hello

    Try asking in the Forums in SQL Server.

    Here is the Vista Forums.

    http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer

    See you soon.

  • How can I retrieve the name of the server and the database to a system dsn

    Hello

    I am trying to create a database that will be used by many stores. Each store has its own server and the database and the access runtime version. I want to create a system dsn name, but allowing the administrator to modify the server and the database for that dsn and then, when you connect to the database, the database must be able to find this DSN and the 'new' name of the server and name of 'new' database and connect to point to this server and the database tables. I don't have a login form and I can get the name of the dsn, but I can't find a way to get the server name and database name for that dsn. Does anyone know a way to retrieve this from the registry. I can see it using regedit but have no idea on how to get this in vba access.

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • Media Center Question can I have set up as a server and the other two as clients, each using two of the tuners of the card?

    I have 3 computers running Windows 7 Professional, one of them has a four installed tuner DVB - s2 card. I want to configure it as a server and the other two as clients, each using two of the tuners of the card. I understand the media library is able to use the basic network TV tuning cards, so there must be some way for me to configure the server to send the information over the network.

    Any ideas?

    On Fri, September 19, 2014 12:28:56 + 0000, SamJ008 wrote:
     
    > I have 3 computers running Windows 7 Professional, one of them has a four installed tuner DVB - s2 card. I want to configure it as a server and the other two as clients, each using two of the tuners of the card. I understand the media library is able to use the basic network TV tuning cards, so there must be some way for me to configure the server to send the information over the network.
    >>
    >>
    >>
    > Any ideas
     
     
    Start reading here
     
    You will not be able to use your existing tuners like tuner network. Microsoft has
    arrested development of Media Center, so don't expect any new hardware/software to
    appear.
     
     
     
    __________________________________________________________________________________________________
    Barb
    MVP Windows Entertainment and connected home
     
    Please mark as answer if that answers your question
     
     
     
  • Is it OK for the test server, and the server signs Local point to the same location?

    There seems to be three places where the files of my site: local files, server assessment and remote server.  I am happy with the remote server.  What I'm confused about are the other two.

    I understand that to build a site using mysql databases that I need to set up a test server.  Here is my configuration: Windows 10, CBWMS 2015.1 using XAMPP with the folder root of my site in htdocs.  I tested FormMail, hence the name of the site is formmail

    So, I open one of my files from the local files (right) Panel, modify it and it save (in the local files Panel).  I then use a preview in the browser to see my changes.  It seems that I didn't need to use was ABLE to move the file to the test server, because the file/s are already here, because as shown in the screenshot, the display of local files as the testing server view are in the same place.  What is the point of the testing server Panel?

    I know that I can put the Panel on the left with the remote server. This will allow me to sync with my ISP host.  If I put the left - and probably testing server Panel a sync is useless because the files are in the same place as the Local file?

    Maybe my setup is incorrect.  I guess my question is, is it OK for the test server, and the server signs Local point to the same location?

    Thank you gentlemen (and Lady!) I'll go forward with newfound confidence, Bravo.

  • "Try to connect with the server" and the update bar remains at 2%

    Hello, my creative cloud is not updated, there simply to appear the message "Try to connect with the server" and the update bar remains at 2%. How could I solve this problem? Thank you.

    Mac or Windows and EXACTLY what version of the operating system?

    Recent Mac AND Windows operating systems have been known to cause problems "weird."

    Please read https://forums.adobe.com/thread/1499014

    -try some steps such as changing browsers and disable your firewall

    -also clear the cache of your browser if you start with a fresh browser

    -check the file hosts for blocked entries https://forums.adobe.com/thread/1912777

    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip.

    https://helpx.Adobe.com/creative-cloud/KB/creative-cloud-desktop-application-failed.html

    http://helpx.Adobe.com/creative-cloud/KB/failed-install-creative-cloud-desktop.html

  • Can I install SQL Server on the server vCenter?

    Is it possible to install SQL server on the vCenter server or the connection to the server...

    Due to limited memory problems, I have to make some adjustments with my setup to migrate.

    Thanks in advance.

    Hey Taher843,

    If your environment is small, you can install vCenter with SQL Express that comes with the installation of the vCenter server.

Maybe you are looking for