Subscribe to this thread
Home - General / All posts - Creating IMS site like Routing example
wilik
284 post(s)
#05-Apr-11 00:12

I have created a network consisting of a collection of intersecting trails and would now like to create an IMS site like the Manifold Routing example. Would anyone care to comment on the problems and issues I might have by just taking my map and using the asp files that come with the example. Please don't use dumb, stupid, lazy, etc since I am already very familiar with those adjectives. I know that one issue is creating the linked route drawing that exists in the example and potential version issues? Others? Thanks!

Gustavo Palminha

1,010 post(s)
#05-Apr-11 00:18

I've donne a similar IMS site, on my case one user selected a set of points based on a date period (from date... to date).

Those points were ordered by "timestamp" so it was easy to create a query for it.

As far as...

Would anyone care to comment on the problems and issues I might have by just taking my map and using the asp files that come with the example

I dont understand exactly what you mean, but I used as a base a regular IMS template, and there was no particular problems with this approach.

Regards.


Stay connected:

Linkedin >> http://www.linkedin.com/in/gustavopalminha

Twitter >> http://twitter.com/gustavopalminha

Other >> http://www.spatialmentor.com

wilik
284 post(s)
#05-Apr-11 00:55

I'm not sure how to get what I want if you mean by "regular IMS template", a page that is generated by exporting a web page. Want I want is an IMS that will allow a viewer to select a variety of trails from my trail network and receive a an output of the time and distance traveled. My thought was to use the map.asp,table.asp, and default.asp files from the Mexico example but replace the Mexico map with my map. It would work very similar to the Optimal Route (visual) that is available in the drop down drawing menu in a regular Manifold map project. I haven't thought about it, but I'm not sure how to get that with a regular query.

Gustavo Palminha

1,010 post(s)
#14-Apr-11 12:39

Hi.

...regular IMS template....

It means that my startup project was a IMS template exported by Manifold.

Want I want is an IMS that will allow a viewer to select a variety of trails from my trail network and receive a an output of the time and distance traveled. My thought was to use the map.asp,table.asp, and default.asp files from the Mexico example but replace the Mexico map with my map.

As far as the Optimal Route (visual), if you need to do replicate it, I'm almost sure it cant be done using SQL.

You should take a look at http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm, there you will have details on the algorithm.

There are other algorithms, this (Dijkstra) is also present on many PNA (http://en.wikipedia.org/wiki/Personal_navigation_assistant) devices as well as IMS.

Regards.


Stay connected:

Linkedin >> http://www.linkedin.com/in/gustavopalminha

Twitter >> http://twitter.com/gustavopalminha

Other >> http://www.spatialmentor.com

Gustavo Palminha

1,010 post(s)
#14-Apr-11 13:04

Additional site on "Dijkstra's Algorithm" here http://www.algolist.com/Dijkstra%27s_algorithm.


Stay connected:

Linkedin >> http://www.linkedin.com/in/gustavopalminha

Twitter >> http://twitter.com/gustavopalminha

Other >> http://www.spatialmentor.com

wilik
284 post(s)
#14-Apr-11 16:10

Thanks Gustavo,

I think the code for the routing example is adequate but I think there may version issues-it half works and half doesn't. Additionally. I have trouble defining an adequate route for the example. The procedure per the FM seem pretty clear but the execution (mine anyway) seems to be real "ticky" multiple node point generation, "connectedness", click accuracy and so on. If I can't get it to work soon I will have to resort to writing code which will be a really big deal for me.

wilik
284 post(s)
#15-Apr-11 04:28

oops-mistake

wilik
284 post(s)
#18-Apr-11 22:52

Since I'm not an experienced programmer, I have tried to reproduce the "Mexico" routing example found on the Manifold website by substitution of map files, leaving the "Mexico" asp files intact. At this point I have been able to replace the Mexico map with my map and have everything work well with one exception. The selected route is not redrawn on the map with my map as it is on the "Mexico" map. The report is printed correctly and the animation is displayed correctly. As far as I can see both maps are conceptually and thematically the same. I would like to be able to account for the difference. Any ideas?

Gustavo Palminha

1,010 post(s)
#19-Apr-11 11:20

The selected route is not redrawn on the map with my map as it is on the "Mexico" map.

Do you mean highlighted in red?

Are you using mapserver.query?

If so, try to use,"true" on parameters "boolean force", and "boolean zoom"


Stay connected:

Linkedin >> http://www.linkedin.com/in/gustavopalminha

Twitter >> http://twitter.com/gustavopalminha

Other >> http://www.spatialmentor.com

vincent

1,972 post(s)
#19-Apr-11 14:10

The route is rendered by a query (Route Query) and a drawing linked to it (Route). The renderParameter method is used in map.asp to fill the query and the drawing with the route WKT.

Be sure that this is working in the map file with the GUI before going in IMS:

1- Set a very visible point format for the Route drawing.

2- Run the Route Query. Fill it with: point(272 -316) // coordinate for the Mexico example - choose one for your area

3- Refresh data on the Route drawing

You should see a point on the map.

wilik
284 post(s)
#19-Apr-11 19:52

Thanks for your comments on this!

Gustavo,

The route in my map is not highlighted at all even though the route animation works correctly. The route in the Mexico map is highlited in green, consistent with thematics in the route layer of the map. The routes in both maps are highlighted in red when the optimal route (visual) tool is used.

I don't think the mapserver.query is used. I think the variables route and routeObj are used to defined the selected route. RouteObj uses the OptimalRoute method of the analyzer to define the route which has a boolean variable for splits in the route (I think). It is set to"true".

Vincent,

Prior to using the maps with the IMS asp files I operate both maps and attempt to verify that they are identical. As far as I can tell both maps are identical in layers, layer properties with one exception. The projection in my roads layer is different than the Mexico roads layer, but I don't think that is the problem. Both maps work identically within the Manifold map itself - at least from the standpoint of the optimal route tool.

I think I did exactly what you said. I typed "point(272-316)//" into the value for the wkt parameter in the Query Parameters but didn't see any additional points in the Route drawing, just the one that was there when I created the drawing. I have always seen one point in the route drawing.

Questions-

Is it possible that there are version differences between Manifold 8.0.24.0 and the version that the Mexico map was created with?

It would help if I were able to load the IMS site into vs2008 and step through the program but when I try I get an error message that my asp files are forbidden-I have tried a couple of fixes for this that I found on the internet but haven't been successful so far. I'm not experienced enough with VS to get it to do what I want to identify what parts of the asp code are doing what.

vincent

1,972 post(s)
#19-Apr-11 20:12

Wilik,

The syntax is : point(coord1[space]coord2)

So "point(272-316) is not ok. While "point(272 -316)" is ok. The second coord is negative.

Make sure your Route layer coord system is the same as your map component. Then pick a coordinate on your map coordinate. If your map is projected, use a projected coordinate.

You should see a point on the map after at the specified coord. If you cannot see it in the GUI, do not expect to see it in the IMS.

Vincent

wilik
284 post(s)
#19-Apr-11 20:28

Vincent,

The Mexico map was provided with a lat-long projection. I have reprojected it, as well as mine, and everything always works fine when I don't screw up. As I said everything works identically in the GUI in both maps. Arrival times are all realistic when metrics and speeds are correct. I have tried to include both maps for your amusement.

Attachments:
Mexico.map
West Template.map

vincent

1,972 post(s)
#19-Apr-11 22:41

There was an error with your linked drawing.

I deleted it. I created it again, dragged it in the map, save it up and push it to the web server and this is working.

To see if the linked drawing is working you can simply modify this line in map.asp:

mapserver.RenderParameters("Route") = Session("wkt");

to

mapserver.RenderParameters("Route") = "point(coord1 coord2)"

You should see a point at this coord at every rendered map. Your linked drawing was not responding.

Vincent

wilik
284 post(s)
#20-Apr-11 00:08

"There was an error with your linked drawing"

Would you confirm that you mean there was an error in the linked Route drawing in the west template map. If there is(was) an error , what was it? I have both files located in a folder in inetpub\wwwroot that contains the asp and image files. I can replace the Mexico map with the west template map in the config.txt file and see the differences I described above. If I make the substitution you recommend above (without changing either linked route drawing) the Mexico map displays the same as the west template map and does not display the selected route. I also don't see the point. I need to work with this a little more to understand better what's going on. Thanks for your suggestions Vincent! I will get there one way or the other.

wilik
284 post(s)
#20-Apr-11 02:05

I redid that drawing several times with the same result. I don't know what I was doing but it now works. I really appreciate all of your help esp. Vincent since the last thing I would have done would have been to recreate the route drawing.

Gustavo Palminha

1,010 post(s)
#20-Apr-11 02:12

Is it possible that there are version differences between Manifold 8.0.24.0 and the version that the Mexico map was created with?

I dont think so.

It would help if I were able to load the IMS site into vs2008 and step through the program but when I try I get an error message that my asp files are forbidden-I have tried a couple of fixes for this that I found on the internet but haven't been successful so far. I'm not experienced enough with VS to get it to do what I want to identify what parts of the asp code are doing what.

Probably you should study a bit more the asp files. If you require any help for debugging this, send me a zip of the project and I will take a look.

You should see a point at this coord at every rendered map. Your linked drawing was not responding.

I was not able to confirm this.


Stay connected:

Linkedin >> http://www.linkedin.com/in/gustavopalminha

Twitter >> http://twitter.com/gustavopalminha

Other >> http://www.spatialmentor.com

wilik
284 post(s)
#20-Apr-11 05:28

When I used to program more (and ancient languages) I could step through a program, set break points, etc like I think I should be able to do with vs 2008 but I don't know how to get it to work with asp-need to put in more effort than I have right now.

I think I was able to confirm what Vincent was saying but I think I always had a point in the map from the linked drawing. In any event all I did was what Vincent said he did - delete, create, project and Walla! there it was - Go Figure!

vincent

1,972 post(s)
#20-Apr-11 14:36

I always had a point in the map from the linked drawing

Normal. Query that returns a null result is returning a point (0,0).

When I tested your map live, there was nothing to do to update the point or route position, even if the route "wkt" was generated by the code and passed to map.asp.

Since your linked drawing was not reacting at all (excepted in GUI), I created it again, just to be sure. It did it. Why ? I don't know.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.