VectorLayer , Feature, Point, Style


 Summarize

For mapviewer 11G v2 at client.

1. draw a point

 var local_route;
  local_route = new OM.layer.VectorLayer("local_route",{def:{type:OM.layer.VectorLayer.TYPE_LOCAL}});
  map.addLayer(local_route);
  var nStyle = new OM.style.Marker({src: "/m/icons/t_pr_ena.png"});
  var nPoint = new OM.geometry.Point(-122.4469157,37.7699298, 8307, 1, 0);
  var nFeature = new OM.Feature("feature1", nPoint,{renderingStyle:nStyle}); 
  local_route.addFeature(nFeature);

2.draw a line

  var start = new OM.style.Marker({width: 90, height: 90, src: "../../images/circle.gif"});       
  var end= new OM.style.Marker({width: 70, height: 70, src: "../../images/pin.gif"});   
  var lineStyle0 = new OM.style.Line({strokeThickness:5, stroke:"#0000f3", strokeOpacity:0.5,startMarker:start,endMarker:end});
  var line = new OM.geometry.LineString([-122.4469157,37.7699298,-22.4469157,39.7699298,-100,37.7699298],8307);
/*
    var outArray = new Array();
  //add  point
         outArray.push(-74.46); outArray.push(42.70);
        outArray.push(-73.66);outArray.push(43.26);
        outArray.push(-72.46008);outArray.push(42.70992);
        outArray.push(-71.11773);outArray.push(42.48635);
        outArray.push(-71.11764);outArray.push(42.48583);
        outArray.push(-71.11752);outArray.push(42.4852);
    var line = new OM.geometry.LineString(outArray,8307);
*/
 
var route = new OM.Feature("route", line,{renderingStyle:lineStyle0});
  local_route.addFeature(route);

评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

Data URI是由RFC 2397 ACE