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

  • Home
  • SEARCH
  • 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 6330425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:52:04+00:00 2026-05-24T17:52:04+00:00

I have a google maps api v3, which uses The Di Lab’s plugin for

  • 0

I have a google maps api v3, which uses “The Di Lab”‘s plugin for polygon drawing:

http://www.the-di-lab.com/?p=219

And then uses tparkins plugin for raycasting.

https://github.com/tparkin/Google-Maps-Point-in-Polygon

However, I need to access the polygon object from the polygon plugin. The section in the polygon plugin that actually plots the Polygon on the map is:

this.polygonObj= new google.maps.Polygon({
                paths: this.coords,
                strokeColor: "#FF0000",
                strokeOpacity: 0.8,
                strokeWeight: 2,
                fillColor: "#FF0000",
                fillOpacity: 0.35,
                map:this.map
});

And I would create the map with:

var creator = new PolygonCreator(map);

I then have to do the point in polygon via calling:

var isWithinPolygon = polygonObj.containsLatLng("52,0");

So for example:

var coordinate = new google.maps.LatLng(40,90);                                                                                                                                                                                                       
var polygon = new google.maps.Polygon([], "#000000", 1, 1, "#336699", 0.3);
var isWithinPolygon = polygon.containsLatLng(coordinate);

Basically all I need is the polygon object from the first script. The two javascript files are below:

http://80.229.168.62/guild_service/server/js/polygon.min.js

http://80.229.168.62/guild_service/server/js/latlngcontains.js

The page running the scripts is:

http://80.229.168.62/guild_service/server/map_view.php

  • 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-24T17:52:05+00:00Added an answer on May 24, 2026 at 5:52 pm

    If you are creating the Polygon via the creator.pen.drawPloygon() (no that’s not a typo on my part–the function really is spelled that way in polygon.min.js), then you should be able to retrieve it from creator.pen.polygon.getPolygonObj().

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

Sidebar

Related Questions

I have a small Python program, which uses a Google Maps API secret key.
We have an existing website which currently uses v2 of the google maps api
I have an application that uses the Google Maps API to geocode distances between
Ok, so I have a site that uses the google maps API, and I
I have a webpage that heavily uses Javascript (AJAX requests, Google Maps API, HTML
I have a dynamic map in Google Maps (API v2) I want to overlay
I have a simple object that get's geocoding data from the Google Maps API
I am having some trouble with the Google Maps API . I have an
I have a page where I need SWFObject, jQuery and Google Maps API. I
I am using google maps api v3 and have an array of arrays object:

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.