Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
Please find the attached htm file and modify it to your specific needs.
Hope this helps.
Regards,
Ramana
"Fernando.Digicadd" wrote in message
news:EBB29153AC6745AD55845BF1DE4644CC@in.WebX.maYIadrTaRb...
> Hi!
>
> Anyone knows how to use "addPolylinePrimitive"?? if yes, please send
me
> one example.
>
>
> Thanks
>
> Fernando
> fernando@digicadd.com.br
>
>
>
>
function getThisMap() { if
(navigator.appName == "Netscape")
return document.myMap;
else return
window.myMap; }
function add_pgon() { // get map
object var map = getThisMap(); // exit function if 'Polygon Name' text box
is empty if (document.the_form.the_textbox.value == "") { alert("Please
enter a polygon name.") return; } // if browser is Netscape, use 'Ex'
version and pass // observer applet; if browser is Internet Explorer, //
use 'non-Ex' version with no argument if (navigator.appName ==
"Netscape") map.digitizePolygonEx(document.obs); else map.digitizePolygon(); }
function onDigitizedPolygon(map, numPoints,
points) { // create variable and assign it user-specified value // from
'Polygon Name' text box var formText =
document.the_form.the_textbox.value; // create redline layer, or get it if it
already exists var myLayer = map.getMapLayer("My Redline Layer"); if
(myLayer == null) myLayer = map.createLayer("redline", "My Redline
Layer"); // create redline object or get it if it exists (getMapObject //
takes an object key as its value, while createMapObject takes // a key and a
name -- the formText variable supplies both of // those values) var obj =
myLayer.getMapObject(formText); if (obj == null) var obj =
myLayer.createMapObject(formText, formText, ""); // create MGCollection that
holds user-specified polygon vertices var user_vertices =
map.createObject("mgcollection"); user_vertices.add(numPoints); // use
MGCollection to create polyline primitive and add it to // redline
object obj.addPolylinePrimitive(points, user_vertices, false); // clear
contents of 'Polygon Name' text box document.the_form.the_textbox.value =
""; }
function save_it() { var
fName = "c:\\My Documents\\my_map.mwf"; // use '/' or '\\', not
'\' var password = prompt("Please enter a password.",
"");
if ( getThisMap().saveMWF(fName,
password) ) alert("Map has been
saved!");
else alert("Unable to save
map."); } </script>
<SCRIPT
LANGUAGE="VBScript"> Sub myMap_onDigitizedPolygon(map,
numPoints, points)
onDigitizedPolygon map, numPoints, points End
Sub </SCRIPT>
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">Please
find the attached htm file and modify it to your specific needs.
Hope
this helps. Regards, Ramana
"Fernando.Digicadd"
<fernando@digicadd.com.br> wrote in
message news:EBB29153AC6745AD55845BF1DE4644CC@in.WebX.maYIadrTaRb... >
Hi! > > Anyone knows how to use
"addPolylinePrimitive"?? if yes, please send me > one
example. > > > Thanks > > Fernando >
fernando@digicadd.com.br > > > >