Discussion:
Is This Possible?
(too old to reply)
Trevor Daniel
2009-09-28 12:33:01 UTC
Permalink
Hi,

I have a taxi calculator website.

I have started to write a mobile application for taxi drivers to use that
will enable me to send them jobs directly from the website.

I have got the software to work out the lat/long from the built in GPS but I
now want to tell Mappoint where the taxi is.

Is it possible to programmatically add an entity to a custom datasource on
the mappoint servers?

I need to add them to the mapping database so I can do findnearby
calculations to only send them fares near them.

I want to be able to upload their lat/longs every 60 seconds or so.

Can this be done?

Anyone got any pointers on how to do it please?

Thanks

Trev
Derek Chan
2009-09-28 21:06:01 UTC
Permalink
Trevor,

It's possible to do it using of Mappoint Web Services but not in the time
frame your expecting. Basically if you updated a datasource in MWS it would
take up to 24 hours for the datasource to be fully updated. How about the
following (easier and quicker):

Feed the Lat/longs to SQL Server (any version of SQL will do). If you need
to do any geocoding send them to the Mappoint Web Service. Then use the
following algorithm to execute a FindNearby call:

http://timheuer.com/blog/archive/2007/01/31/13975.aspx

Or better yet using SQL 2008, doing a spatial query over your results will
make things simpler.

When you have your results, use AJAX to serve them up to the client side and
on a bing map.

Hope that helps,
--
Infusion Development
http://www.infusion.com
Post by Trevor Daniel
Hi,
I have a taxi calculator website.
I have started to write a mobile application for taxi drivers to use that
will enable me to send them jobs directly from the website.
I have got the software to work out the lat/long from the built in GPS but I
now want to tell Mappoint where the taxi is.
Is it possible to programmatically add an entity to a custom datasource on
the mappoint servers?
I need to add them to the mapping database so I can do findnearby
calculations to only send them fares near them.
I want to be able to upload their lat/longs every 60 seconds or so.
Can this be done?
Anyone got any pointers on how to do it please?
Thanks
Trev
Trevor Daniel
2009-09-29 12:51:02 UTC
Permalink
Hi Derek,

Thank you very much for taking the time to answer. This is going to help me
loads!

Trev
Michael Coles
2009-10-18 03:31:22 UTC
Permalink
I just wanted to add to Derek's answer - if you use SQL Server go for SQL
2008 if possible and use the spatial data types (geometry and geography).
They have a lot of built-in methods for performing queries of the kind you
are looking for. For instance, I can do a proximity search of the kind
described in the article Derek cited with the STBuffer and STIntersects
methods like this:

-- 4269 in this query is the SRID for the North American Datum-83 coordinate
system
-- Query finds returns all streets that intersect within 75 meters of the
given point

SELECT *
FROM Streets s
WHERE s.StreetPath.STIntersects(geography::Point(@Lat, @Lon,
4269).STBuffer(75)) = 1;

There are other methods you can use as well, like STDistance, etc. And you
can also set up geospatial indexes for better performance.
--
Thanks

Michael Coles
SQL Server MVP
Author, "Expert SQL Server 2008 Encryption"
(http://www.apress.com/book/view/1430224649)
----------------
Post by Derek Chan
Trevor,
It's possible to do it using of Mappoint Web Services but not in the time
frame your expecting. Basically if you updated a datasource in MWS it would
take up to 24 hours for the datasource to be fully updated. How about the
Feed the Lat/longs to SQL Server (any version of SQL will do). If you need
to do any geocoding send them to the Mappoint Web Service. Then use the
http://timheuer.com/blog/archive/2007/01/31/13975.aspx
Or better yet using SQL 2008, doing a spatial query over your results will
make things simpler.
When you have your results, use AJAX to serve them up to the client side and
on a bing map.
Hope that helps,
--
Infusion Development
http://www.infusion.com
Post by Trevor Daniel
Hi,
I have a taxi calculator website.
I have started to write a mobile application for taxi drivers to use that
will enable me to send them jobs directly from the website.
I have got the software to work out the lat/long from the built in GPS but I
now want to tell Mappoint where the taxi is.
Is it possible to programmatically add an entity to a custom datasource on
the mappoint servers?
I need to add them to the mapping database so I can do findnearby
calculations to only send them fares near them.
I want to be able to upload their lat/longs every 60 seconds or so.
Can this be done?
Anyone got any pointers on how to do it please?
Thanks
Trev
Michael Coles
2009-10-18 03:39:13 UTC
Permalink
Almost forgot to mention the downside -- SQL Server 2008 doesn't necessarily
support the formats that Bing Maps expects to see. For instance, GML is
supported but not the GeoRSS GML format that Bing Maps appears to consume.
Even in SQL 2008 GML support there are some oddities that have to be
accounted for. SQL does not support KML. SQL 2008 support Well-Known Text,
but I haven't found anything to indicate Bing Maps supports it.

My solution to get around these limitations has been to use a custom SQL CLR
user-defined function to convert my SQL spatial data directly to the Bing
Maps JavaScript VEShape constructors. Until these two programs get in sync
with one another it will be a case of converting from SQL Server-supported
formats to Bing Maps-supported formats on the server or in the client
(JavaScript).
--
Thanks

Michael Coles
SQL Server MVP
Author, "Expert SQL Server 2008 Encryption"
(http://www.apress.com/book/view/1430224649)
----------------
Post by Derek Chan
Trevor,
It's possible to do it using of Mappoint Web Services but not in the time
frame your expecting. Basically if you updated a datasource in MWS it would
take up to 24 hours for the datasource to be fully updated. How about the
Feed the Lat/longs to SQL Server (any version of SQL will do). If you need
to do any geocoding send them to the Mappoint Web Service. Then use the
http://timheuer.com/blog/archive/2007/01/31/13975.aspx
Or better yet using SQL 2008, doing a spatial query over your results will
make things simpler.
When you have your results, use AJAX to serve them up to the client side and
on a bing map.
Hope that helps,
--
Infusion Development
http://www.infusion.com
Post by Trevor Daniel
Hi,
I have a taxi calculator website.
I have started to write a mobile application for taxi drivers to use that
will enable me to send them jobs directly from the website.
I have got the software to work out the lat/long from the built in GPS but I
now want to tell Mappoint where the taxi is.
Is it possible to programmatically add an entity to a custom datasource on
the mappoint servers?
I need to add them to the mapping database so I can do findnearby
calculations to only send them fares near them.
I want to be able to upload their lat/longs every 60 seconds or so.
Can this be done?
Anyone got any pointers on how to do it please?
Thanks
Trev
Loading...