googlemaps / js-polyline-codec Goto Github PK
View Code? Open in Web Editor NEWPolyline encoding and decoding.
License: Apache License 2.0
Polyline encoding and decoding.
License: Apache License 2.0
I seen that this library in encoding skipping the third dimension if present in the coordinates. [lon, lat, z]
is it possible to somehow include it in encoding?
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Is your feature request related to a problem? Please describe.
I have a problem regarding polygon API whenever I tried to use setEditable
method. since when we try to use this method especially for polygon area marker, the library will give a solution to edit any predefined vertex and automatically show a transparent vertex in the middle of the line between each vertex which is good, but I have stumbled at some of condition where user can only edit a predefined vertex without add any new vertex from any transparent vertex, currently I can use roundabout ways to not store any new vertex and stick to the predefined vertex that I got from our API response, but User experience itself is not good since I can't hide the transparent vertex and user can still add vertex but will not be store to our database, that's why if possible can you add any choice if we want to edit our marker but leave out options to add any new vertex in between the line of each vertex that connected?
Describe the solution you'd like
maybe some params like this would be nice:
setEditable({ editable: true, options: { addNewVertex: false, resizeVertex: true, rotateVertext: true } })
while editable
itself from the current polygon params so if we want to have editable feature we set it to true
and if not we can set it to false
, meanwhile options
in here have several feature that can help to customize the polygon area or polyline that we already create. addNewVertex: Boolean
will give us choice if we want to have editable transparent vertex in the middle of each vertex or not like the image above, resizeVertex: true
can help user to edit our polygon with scale approach for example to keep the ratio of the original polygon when we move or click the vertex and drag it to upscale the polygon area, and rotateVertex: Boolean
will help the user to get a shorthand to rotate our predefined vertex without developer need to calculate it manually every time we want to rotate our polygon area
Describe alternatives you've considered
for now I use roundabout way to not store any new vertex that user add after click and drag the transparent vertex and only store the predefined value that we got from API response, but with this approach, the user experience will not be good since we got a lot of question as why the system give a new transparent vertex but cannot be add after save
I have never ported a project before so I'm not sure if there are expectations when it comes to licensing or such.
The source is here: https://github.com/chanced/rs-polyline-codec
Please let me know if I need to do anything. Also, I apologize if this isn't the appropriate channel for this sort of question. I wasn't sure where else to ask.
Thanks!
Japanese site of This link makes Internal Server Error.
https://developers.google.com/maps/documentation/utilities/polylinealgorithm?hl=ja
Is your feature request related to a problem? Please describe.
LatLngTuple
is an alias for number[]
which can have n number of values in it instead of being [number, number]
tuple with only 2 numbers. Hence it can be used with ...
spread operator but cannot be used in places where only 2 positional values of Lat and Long are required.
Example:
Using it with firestore GeoPoint
like this
class GeoPoint {
//...
constructor(latitude: number, longitude: number);
//...
const location: LatLngTuple = [0, 0];
new GeoPoint(...location); //invalid
will cause the following error
error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter
Describe the solution you'd like
Make LatLngTuple a proper [number: number]
tuple and in encode function let the union type be (number[] | LatLng | LatLngTuple)
to keep the fliexibility
Describe alternatives you've considered
const location: LatLngTuple = [0, 0];
new GeoPoint(location[0], location[1]);
main
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can resolve this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://wombat-dressing-room.appspot.com
.
Good luck with your project β¨
Your semantic-release bot π¦π
OS: MacOS
Node: v14.17.0
Version: 1.0.16
I use js-polyline-codec with create-react-app, and currently I'm getting a warning:
WARNING in ./node_modules/@googlemaps/polyline-codec/dist/index.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/stiaje/Projects/admin/node_modules/@googlemaps/polyline-codec/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/stiaje/Projects/admin/node_modules/@googlemaps/polyline-codec/src/index.ts'
Looks like the published index.esm.js.map contains a reference the src/index.ts, which is not part of the published files.
Maybe the sourcemap should not be published, or it should be corrected to only reference available files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.