Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

updating a layer data

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
201 Views, 5 Replies

updating a layer data

Dear all,
I have a vehicle table layer having fields like vehicle ID, Lat, Long. I am receiving a SQL table having updating new Lat/Long of the vehicle through GPS.
1) How can i change my vehicle BMP lat/Long with my latest received lat/long of GPS.
2) how can i refresh my vehicle layer data

Regards
Anil Dhiman
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

There's a lot of pieces to this to make it all work. You need to have some
sort of server-side process that receives the GPS data and populates your
table. This is dependent on how you are receiving those coordinates from
your GPS service provider. This is independent process from anything you
are doing in MapGuide.

Once this process is in place, create a SQL view that displays only the
latest point data for each vehicle. Reference this view as a MapGuide point
layer. Each time you refresh your layer, your points will move to the
latest lat and lon since you are referencing the SQL view.

To refresh a layer, in your main map embed page, use the JavaScript
setTimeout() method to fire another function at your set time interval.
This other function needs to call the MapGuide API. Something like:

function layerRefresh(yourLayer)
{
MyMap.setAutoRefresh(false);
MyMap=getMyMap();
var layer=MyMap.getMapLayer(yourLayer);
layer.setRebuild(true);
MyMap.setAutoRefresh(true);
MyMap.refresh();
}

If you haven't worked with the MapGuide API, the best place to start is with
the API Help documentation and there are several examples in there that
should get you going.


--
Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com


wrote in message news:5112550@discussion.autodesk.com...
Dear all,
I have a vehicle table layer having fields like vehicle
ID, Lat, Long. I am receiving a SQL table having updating new Lat/Long of
the vehicle through GPS.
1) How can i change my vehicle BMP lat/Long with my latest received lat/long
of GPS.
2) how can i refresh my vehicle layer data

Regards
Anil Dhiman
Message 3 of 6
Anonymous
in reply to: Anonymous

Dear Andy,
Thanks a lot ,but I am not getting the creating view part and referencing the point layer
Can u plz explain in details

Regards,
Anil Dhiman
Message 4 of 6
Anonymous
in reply to: Anonymous

This is bit beyond the scope this discussion forum. You may want to consult
with your nearest database administrator to find out how to create a view in
your database and what SQL syntax you would use to retrieve only the latest
points.

Take a look at the MapGuide Author help documentation on how to create a
point layer from a database table (or view) that contains X and Y fields.

Andy

wrote in message news:5113741@discussion.autodesk.com...
Dear Andy,
Thanks a lot ,but I am not getting the creating
view part and referencing the point layer
Can u plz explain in details

Regards,
Anil Dhiman
Message 5 of 6
Anonymous
in reply to: Anonymous

Dear Andy
Thanks 4 ur response
I have created a view in database but i am still stuck up, Now I have my view consistes of latest timings of all vehicles with their vehicle ID
Now Do i need to create a layer from this view or the point layer is previously there itself
Please tell me how to refer to a view such that the point layer will change

Plz help me out from this jeopardise

Thanking u again
Anil Dhiman
Message 6 of 6
Anonymous
in reply to: Anonymous

Dear Andy,
I have got an idea to proceed tell me whether is this possible or not for a vehicle tracking solution

I have my GPS table with recent Lat/Long or view . table is having fields like ---- Vehi_ID,Lat,Long
I have one layer with Vehicles Points with DBF data having Fields like vehicle_ID
so Can i update my DBF data with the GPS data
and refresh the map after some time

Is this strategy will work fine

Thanks & Regards
Anil Dhiman

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report