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: 

Mapguide 6.5 buffer

0 REPLIES 0
Reply
Message 1 of 1
kurtybain
790 Views, 0 Replies

Mapguide 6.5 buffer

Hi, im kinda new to mapguide programming, im using MapGuide 6.5 viewer. My application builds a route beginning from a start point to an end point. After several calculations and database queries, the route coordinates are sent to mapguide. The route is drawn in a layer called "ROUTE".

After that, i create a buffer of 100m around the route via javascript, in order to make an analysis. The analysis should bring all the gas stations that are inside the buffer area. This gas stations are in another layer, lets suppose its called "GASSTATIONS";

The problem is that, I cant select the buffer area so i can use the selectWithin() function. I'm doing everything with javascript.

I guess this is somehow the code, please correct me if im wrong

The route is already selected automatically after its creation, after that, there is a button which calls this function.

function buffer()
{
var map = getMap();
var buffer_layer = map.viewBuffer();
.....
..... customizing buffer
.....
var map_selection = map.getSelection();
var buffer_feature = buffer_layer.getMapObject(); <---which is the key for the buffer object?
map_selection.clear();
map_selection.add(buffer_feature,false);
map.selectWithin(); <---I dont know which are the arguments for this function
}

so far, thats what ive figured out, i wonder if you could please give me a hand with this. thanks in advance.




}
0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report