Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi marker feature in a single map #27

Open
pasangtamang opened this issue Oct 21, 2020 · 7 comments
Open

Multi marker feature in a single map #27

pasangtamang opened this issue Oct 21, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@pasangtamang
Copy link

Recently we were in need of adding multiple location. As a solution we were in need of option to add multi marker from in Google map plugin. We extended the feature from original package and now we would like to make this available for community. Below you can see how the UI is
image
Next step is create a PR to merge with the plugin?

@ronaldbarendse
Copy link
Collaborator

@pasangtamang Rewriting this package to properly support multiple markers will require quite some work, so feel free to share the things you've already done by creating a PR.

The current editor is also explicitly named Google Maps Single Marker and the PVC only returns a single marker/address:


public override Type GetPropertyValueType(IPublishedPropertyType propertyType) => typeof(GMapsModel);

To prevent breaking changes, the multiple marker editor can be created as a completely different editor or would otherwise require at least the following:

  • Specify minimum and maximum amount of markers (similar to the Multi URL Picker), defaulting to maximum of 1 (to keep backwards compatibility when upgrading)
  • Return a different value type in the PVC (either a list of GmapsModel or a new model class containing multiple addresses and a single map config, as that's the same for all addresses/markers)
  • Store the property data differently (basically the same as with the PVC value, although this need to support existing data stored by Umbraco)

Because of all the complexities involved with this, I would recommend just adding this editor within a Nested Content/Block List and have every marker stored separately and render it in a single map on the front-end.

@ronaldbarendse ronaldbarendse added the enhancement New feature or request label Nov 3, 2020
@pasangtamang
Copy link
Author

@ronaldbarendse My implementation I have done as a separate data type. So existing single picker will still remain same as it was. I will add a PR so you can see the changes.

@robertjf
Copy link
Collaborator

@pasangtamang are you still interested in contributing your enhancements to the package? We've recently upgraded to support both Umbraco 8 & 9 and I'd be very interested to see your changes and how we can incorporate them...

@pasangtamang
Copy link
Author

@robertjf It's been a long time I made changes as per few of my project requirement. I will check my repo and refresh myself. Then I will get back to you on this topic before end of this week.

@robertjf
Copy link
Collaborator

@pasangtamang that'd be great if you could :) Would be a great addition to version 2.0.2 - even if you could get the html and controller changes that'd be a great start :)

@robertjf robertjf added this to the 2.0.2 milestone Dec 15, 2021
@pasangtamang
Copy link
Author

@robertjf I did a look into my code and found that due to new structural change in this package, I have to do some bug fixing. This will take me few more days. With the older version it works fine. If you want to check before my bug fixing in newer version then you can check in branch v1.3.2 from my repository (https://github.com/pasangtamang/Our.Umbraco.GMaps/tree/v1.3.2). There is one thing you will notice quickly. In backoffice you will find all the marker not showing at once. It switched only after you click on edit button.

@robertjf
Copy link
Collaborator

thanks @pasangtamang - I'll take a look and see how I can adapt it...

Ta

@robertjf robertjf modified the milestones: 2.1.0, 2.2.0 Jul 2, 2022
@robertjf robertjf added the good first issue Good for newcomers label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants