Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:07:08+00:00 2026-05-23T15:07:08+00:00

how to draw a circle in openlayer map? i have tried in diff way,

  • 0

how to draw a circle in openlayer map? i have tried in diff way, but its not working.. please help me with code. I have used the following code.. but its creating polygon

var p1 = new OpenLayers.Geometry.Point(439000, 114000);
var p2 = new OpenLayers.Geometry.Point(440000, 115000);
var p3 = new OpenLayers.Geometry.Point(437000, 116000);
var p4 = new OpenLayers.Geometry.Point(436000, 115000);
var p5 = new OpenLayers.Geometry.Point(436500, 113000);
var points = [];
points.push(p1);
points.push(p2);
points.push(p3);
points.push(p4);
points.push(p5);

var linearRing = new OpenLayers.Geometry.LinearRing(points);
var polygonFeature = new OpenLayers.Feature.Vector(linearRing, null, style_green);
vectorLayer.addFeatures([polygonFeature])
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:07:08+00:00Added an answer on May 23, 2026 at 3:07 pm

    I used OpenLayers.Geometry.Polygon.createRegularPolygon to do this:

    var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(
        new OpenLayers.Geometry.Point(0, 0),
        1,
        30
    );
    var feature = new OpenLayers.Feature.Vector(circle);
    

    And there is your circle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To draw a circle on map I have a center GLatLng (A) and a
I was writing some canvas code to draw a circle, but it never got
I want to draw a circle on map view. I want the user to
i do not want to draw a circle on the same layer the background
There is a fast way to draw circle like this void DrawCircle(float cx, float
I what to draw a circle that uniformly fits into its space, with a
Following Mootools class helps developer to draw a circle overlay on Google Map using
How to draw a circle on a form that covers the whole working area?
I am trying to draw a circle using the following code. -(void)drawRect { CGContextRef
I need to draw a circle onto a bitmap in a specific colour given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.