Giter VIP home page Giter VIP logo

gmaps's Introduction

Important

If you're developer, I'm moving gmaps.js to NPM, you can give your opinion and check the migration progress in Issue #404


gmaps.js - A Javascript library that simplifies your life

gmaps.js allows you to use the potential of Google Maps in a simple way. No more extensive documentation or large amount of code.

Visit the examples in hpneo.github.com/gmaps Go to the API Documentation hpneo.github.io/gmaps/documentation.html

Quick Start

  1. Add a reference to Google Maps API
  2. Add gmaps.js in your HTML
  3. Enjoy!
<!DOCTYPE html>
<html>
<head>
  <title></title>
  <script src="http://maps.google.com/maps/api/js"></script>
  <script src="gmaps.js"></script>
  <style type="text/css">
    #map {
      width: 400px;
      height: 400px;
    }
  </style>
</head>
<body>
  <div id="map"></div>
  <script>
    var map = new GMaps({
      el: '#map',
      lat: -12.043333,
      lng: -77.028333
    });
  </script>
</body>
</html>

Use with AMD

With require.js, you need to load Google Maps JavaScript API first. For example, assuming you have a googlemapsapi.js file:

define(['async!http://maps.google.com/maps/api/js?v=3&sensor=false'], function() {});

Next you have to define the dependency for gmaps.js:

require.config({
  paths: {
    "googlemapsapi": "googlemapsapi",
  },
  shim: {
    gmaps: {
      deps: ["googlemapsapi"],
      exports: "GMaps"
    }
  }
});

Also, you can use the googlemaps-amd plugin.

Build

If you would like to build gmaps from source run the following at the terminal:

git clone https://github.com/HPNeo/gmaps.git
cd gmaps
npm install
grunt

Changelog

0.4.25

  • Change findAbsolutePosition (see #494)

0.4.24

  • Fix bug in getRoutes (see #373)

0.4.23

  • Fix bug at trying to remove a large amount of markers inside a marker cluster (see #473)
  • Check for Google Maps library before creating a GMaps object (see #467)
  • Check the Google Maps API at instantiation instead of declaration (see #467)
  • Add polyfill for google.maps.Rectangle.prototype.containsLatLng

0.4.22

  • Render directions
  • Added missing function for registering addListenerOnce

0.4.21

  • Better check for console.error

0.4.20

  • Show an error in the console, instead throwing an error

0.4.19

  • Fix bug at hiding markers' context menu when the map is zooming

0.4.18

  • Fix bug in array_map

0.4.17

  • Remove the http so the library (Google Maps call) will also work under SSL without warnings
  • Update route drawing methods to allow 'icons' option for drawPolyline
  • Remove dependency on 'grunt-cli' having to be installed globally

0.4.16

  • Fix removeMarkers

0.4.15

  • Add overlay to mouseTarget when click event is set
  • addControl/createControl now accepts HTML elements or HTML strings
  • Add containsLatLng to google.maps.Circle

0.4.14

  • Fix bug in drawPolygon
  • Hide context menu before the zoom is changed

0.4.13

  • Allow unitSystem setting in travelRoute
  • Add functionality to remove controls
  • Delegates non custom events to google.map
  • Convert featureType and elementType toLowerCase in static maps

0.4.12

  • Adds ability to listen for clicks on overlays

0.4.11

  • Add RadarSearch to the places layer
  • Update default control styles to match new Google Maps release.

0.4.10

  • Fix and optimize removeMarkers
  • Fix bug in addMarker (issue #270)

0.4.9

  • Add UMD support (AMD, CommonJS, browser globals)
  • Add retina support
  • FitZoom only use visible markers

0.4.8

  • Fix getRoutes

0.4.7

  • Add callback for failure in getRoutes
  • Update marker clusterer after remove marker
  • Add support for string arrays to arrayToLatLng

0.4.6

  • Allow initialising GMaps without new
  • Added styled map support for static maps
  • Fixed name display for styled maps
  • Allow no zoom for static map request

0.4.5

  • Fix IE8 bug using array_map
  • Add Grunt and Bower support

0.4.4

  • Fix buildContextMenu reference in addMarker

0.4.3

  • Fix removePolylines and removePolygons

0.4.2

  • Fix drawSteppedRoute

0.4.1

  • Fix fitZoom

0.4.0

  • Split gmaps.js in modules

0.3.5

  • Enable new Google Maps style

0.3.4

  • Add support for context menu in multiple maps

0.3.3

  • Fix destination as address in getRoutes

0.3.2

  • Support for removing Fusion Tables and GeoRSS/KML layers with removeLayer

0.3.1

  • Improve event binding at adding markers, polylines or polygons

0.3

  • Add native events to google.maps objects and custom events to GMaps maps
  • Check for Google Maps library and defined element when initialize
  • Allow route origins to be a string or array

0.2.31

  • Fix context menu position bug

0.2.30

  • New feature: StreetView Panoramas

0.2.29

  • New methods: removePolyline and removePolygon
  • Tests for Styled MapTypes

0.2.28

  • Test suite
  • Fix double event firing bug

0.2.27

  • Allow create context menus for markers

0.2.26

  • Fix bug in getElevations
  • Rename fitBounds to fitLatLngBounds

0.2.25

  • Support for GeoJSON in drawPolygon
  • Use 'complete' instead of 'always' in GMaps.geolocate

0.2.24

  • New feature: Overlay Map Types

0.2.23

  • Add full support to google.maps.PolylineOptions
  • New method: removeMarker

0.2.22

  • New feature: Map Types

0.2.21

  • Support to add google.maps.Marker objects in addMarker and addMarkers methods.

0.2.20

  • Add support for other HTML block elements instead "div" (like "section").

0.2.19

  • Use MarkerClusterer to group markers

0.2.18

  • Check if GMaps is defined before load extensions

0.2.17

  • Fix bug with disableDefaultUI option in constructor

0.2.16

  • Fix another bug in createMarker

0.2.15

  • Fix bug in createMarker

0.2.14

  • Adding IDs, classes and innerHTML to createControl. (Note: Use 'content' instead 'text' in createControl)

0.2.13

  • Add support for Places library in addLayer

0.2.12

  • Fix map events without MouseEvent object
  • Fix bug in drawCircle and drawRectangle
  • Fix bug in zoomIn and zoomOut
  • New methods: removePolygon and removePolygons

0.2.11

  • Add support to Panoramio in addLayer

0.2.10

  • New method: toImage

0.2.9

  • Extend the drawSteppedRoute and travelRoute functions

0.2.8

  • New feature: Layers

0.2.7

  • New method: removeRoutes
  • Access all native methods of google.maps.Map class

0.2.6

  • Support for multiple overlays

0.2.5

  • Add support to all marker events
  • Add support for animations at show and remove overlays

0.2.4.1

  • Create GMaps class only when Google Maps API is loaded

0.2.4

  • New feature: Elevation service

0.2.3

  • New method: getZoom

0.2.2

  • Minor improvements to support Backbone.js
  • Fix controls position

0.2.1

  • More default values in GMaps constructor.

0.2

  • Remove jQuery dependency.

0.1.12.5

  • New method "removePolylines" and alias "cleanRoute"

0.1.12.4

  • New methods: fitZoom and fitBounds

0.1.12.3

  • New method: refresh

0.1.12.2

  • New options in GMaps constructor: width and height

0.1.12.1

  • New methods: loadFromFusionTables and loadFromKML

0.1.12

  • New feature: KML and GeoRSS
  • Fix bug in getFromFusionTables

0.1.11

  • New feature: Fusion Tables

0.1.10

  • New feature: Custom controls

0.1.9

  • New feature: Static maps

0.1.8.10

  • Better GMaps.Route methods

0.1.8.9

  • Fix typo in Polyline events
  • Add InfoWindow events

0.1.8.8

  • Add Polyline events

0.1.8.7

  • Add drag and dragstart events to Marker

0.1.8.6

  • Add avoidHighways, avoidTolls, optimizeWaypoints, unitSystem and waypoints options in getRoutes
  • New method: createMarker

0.1.8.5

  • geolocation and geocode methods are static now (using them with GMaps.geolocation and GMaps.geocode)

0.1.8.4

  • Fix typo in geocode method
  • Allow all MapOptions in constructor (see 'MapOptions' section in Google Maps API Reference)

0.1.8.3

  • Add pane option ('floatPane', 'floatShadow', 'mapPane', 'overlayImage', 'overlayLayer', 'overlayMouseTarget', 'overlayShadow') in drawOverlay
  • New methods: removeOverlay and removeOverlays

0.1.8.2

  • Change pane ('floatPane' to 'overlayLayer') in drawOverlay

0.1.8.1

  • Fix bug in drawCircle

0.1.8

  • New feature: Overlays
  • New method: drawCircle

0.1.7.1

  • Bug fix: zoomIn/zoomOut can change zoom by argument
  • New method: setZoom

0.1.7

  • New class: GMaps.Route

0.1.6

  • New feature: Geofence (with markers)
  • New method: drawPolygon
  • Bug fix: Change reserved word in Context menu

0.1.5

  • New feature: Geocoding
  • New method: drawSteppedRoute (similar to travelRoute)

0.1.4

  • New events in addMarker
  • Add step_number property in travelRoute method

0.1.3

  • New feature: Context menu (for map and marker only)
  • New method: travelRoute
  • Change setCenter to panTo in GMaps setCenter method
  • Save entire route data in routes array (instead saving only route path)
  • Context menu and Route example (using travelRoute)

0.1.2

  • drawPolyline can accept both an array of LatLng objets or an array of coordinates
  • New methods: getRoutes and drawRoute
  • Route example

0.1.1

  • Rename drawRoute method to drawPolyline (more accurate)
  • Marker example

0.1 - Initial release

  • Map events
  • Geolocation
  • Add Markers
  • Marker infoWindows
  • Draw routes and circles
  • Initial examples

License

MIT License. Copyright 2014 Gustavo Leon. http://github.com/hpneo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

gmaps's People

Contributors

adelamarre avatar ahmadsoe avatar alessapereyra avatar amsross avatar arturopuente avatar bcherny avatar bjudson avatar coffenbacher avatar crossbreeze avatar diskshima avatar goktug avatar gouthamvel avatar gwpreston avatar hpneo avatar jpsca avatar justgoscha avatar kkirsche avatar koenpunt avatar laktek avatar leesmith avatar luaz avatar lukluk avatar mattwright avatar mikefowler avatar paulmillr avatar reinos avatar renzocastro avatar theomega avatar wickynilliams avatar xenda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmaps's Issues

map.setMapTypeId() throws an error

When attempting to use map.setMapTypeId(...) to dynamically alter the map type, I get the following error:

Uncaught TypeError: Object [object Object] has no method 'setMapTypeId'

I'm using the latest version of gmaps.js with the gmaps api v3.

Thanks!

-phil

resize

Is there a way to update the map, as in, redraw it when the window size changes?

I was thinking if the div is sized so it changes with the window size, something like this could work:

$.resize(function(){
    map.refresh();
});

Error al disparar los eventos directamente

Pasos para generar el error:

  1. http://hpneo.github.com/gmaps/examples/markers.html
  2. Por consola ejecutar: google.maps.event.trigger(map.markers[0], 'click');
  3. Error!

Google Maps recomienda usar para los eventos funciones sin parámetros, aquí pongo un ejemplo:

// a kitten dies
google.maps.event.addListener(marker, 'click', function(e){
e['details'] = details;
...
});

// like a boss!
google.maps.event.addListener(marker, 'click', function(){
this['details'] = details;
...
});

Demo doesn't work

Hi i tried your demo in firefox 12.0 and it didn't work:

GMaps is not defined

map = new GMaps({

Error styling when using Twitter Bootstrap

Hello everyone!

There is an issue that breaks all the styling in the map. The problem is in bootstrap.css. There is a rule not working as expected:

img {
    max-width: 100%;
    vertical-align: middle;
}

The solution is simple. Reject this properties to the img tag inside the map div:

#yourmap img {
    max-width: none;
    vertical-align: baseline;
}

Hope this can be fixed in the next version of the plugin.

Cheers

a is undefined main.js

Hello,
i'm try using your plugin and I get this error:
a is undefined
http://maps.gstatic.com/intl/es_ALL/mapfiles/400d/maps2.api/main.js
line 458
I'm using it like this:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"> <script type = "text / javascript" src = " get ('viewsFolder');?> js / gmaps.js"> var map; $ (document). ready ( function () { map = new GMap ({ div: '# map', lat: -12.043333, lng: -77.028333 }); }); where I am making the mistake?

Creación del Mapa a demanda o tener funciones estáticas

GMaps.js tienes muchas funciones útiles pero para acceder a ellas tienes que pasar por el constructor que te pide crear un mapa.

Aquí hay 2 alternativas para su solución:

  • Dejar como opcional la creación del mapa en el constructor y para crearlo luego con otra funcion, por ejm: buildMap();
  • Convertir las funciones geocode y geolocate a funciones estáticas: this.geocode a GMaps.geocode .
    Por el momento solo he tenido la necesidad de usar esas, pero quizás haya más.

En lo personal me gusta la idea de las funciones estáticas, lo tengo parchado así.

Map in Tabs

We have implemented map and it working ok for normal page but not loading at correct position for tabbed pages.
Please suggest.

Thanks,
Vikas Kumar

Documentation Improvements

This isn't high priority, but I find the documentation layout to be a bit clumbersome. It would be really nice to have a layout similar to coffeescript.org:

• Single page for easy searching.
• 2 column layout comparing GMaps.js API side by side with the Google Maps API equivalent code.
• Inline examples (maybe hidden by default with a button to expand).

I don't think this would be too hard, and it would make the docs much more intuitive.

Possible to get a route and distance between two markers

Is it possible to show a route on the map and a distance (in km) in another div when two markers are known?
I don't care about the route-directions, just the route and the total distance (and perhaps driving-time).
Is this at all possible in google maps?

Customizing markers in non-static maps

Hi there...Love your plugin. Is there any way to customize the markers in non-static maps by using a custom marker or a custom color? Perhaps something similar to how you do it in your static map with markers example?

tarek

Route multiple destinations

is there anyway to do this? when i add multiple destinations (ie. multiple stops) it just picks the last destination listed.

Custom infowindow?

Is there any way of using a custom infowindow such as infobox or infobubble?

thanks,

drawPolygon can't take GeoJSON

gmaps.js can take a format similar to part of GeoJSON, but it turns out the points are swapped (lon/lat rather then lat/lon) -- goofy, I know, but it's a standard format.

I'd be nice if you could support GeoJSON.

error style with bootstrap's modal

first time i open a bootstrap's modal with a map,it seems ok.
When i close the modal and open it again,the map in the modal can only show a little,with blocks of shadow.

How to call the marker.click function from outside the map?

Hi,

This is not an issue, just a query.

I am building a map with several markers (and infoWindows). Now when a marker is clicked, the corresponding infoWindow is displayed (with proper screen positioning). I want to do the same when a place is selected from a drop down list. How can I hook into the google.maps.Marker's click event?

I can call, "map.hideInfoWindows()" followed by "marker[i].infoWindow.open". This does show the info window. But the displayed widow is not centered. And also it does not have any of the events associated with it. I cannot close this window using the "close" button.

Could you please help me with this?

Siddharth

dragend: function(e), e is undefined?

Hi,

I follow the example to get the event, but my return is undefined.

The dragend function got called, and I need the getNorthEast and getSouthWest coordinate...

Any idea?

Cheers,
Mickey

map.zoom only returns original setting not current value

The zoom property is always the same regardless of the zoom level. Which is fine I suppose, although a bit confusing. Unfortunately the workaround to get zoom looks something like map.map.getZoom() which isn't ideal. I'll see if I can't throw up a pull request later today.

Edit: Also noticed getBounds() isn't exposed in any way either so it's the same with map.map.getBounds()

Change custom icon on hover

I can't find a way to change a marker's custom icon on hover.

Here's my code:

map.addMarker({
lat: lat,
lng: long,
icon: '/images/gmap-icon.png',
click: function(e) {
//do something on click
},
mouseover: function(e) { this.setIcon('/images/gmap-icon-on.png'); },
mouseout: function(e) { this.setIcon('/images/gmap-icon-off.png'); }
});

If i do it on a click, the «this.setIcon('/images/gmap-icon-on.png');» code is working but I need to revert to the off state on mouseout. Can you tell why it's not working on mouseover / mouseout?

Thanks!

Suggestion: Expand the scope to not just Google

To be honest, your plugin is the first one that supports geocoding so effortlessly. For a ton of mapping plugins out there, they all seem to focus on the longitude and latitude, which is silly because typical users type address, not two decimal numbers.

Now, I am curious if you have plan to make gmaps even better by making the project more universal, meaning, with the same set of APIs, you can easily switch between providers, such as OpenStreetMap, BingMaps, and GMaps?

IIRC, GMaps is not free if you exceed X number of requests, so there is a need to switch easily between providers.

No IE Support?

The examples don't seem to work in IE7-9, is anyone else having this problem?

jQuery required?!

I think you need to put a big warning on the README so people don't have to read through the whole source to find this (deal-killer) requirement.

Thanks,

Walter

Zooming breaks multiple drawOverlay

Suppose I have multiple overlays on my map using map.drawOverlay(). When I zoom in/out, the overlays wouldn't adapt their location accordingly: they seem to stuck to the original zoom level positioning. I've tried using both master and framework-free branch to no avail.

I ended up using infobox (http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox) to achieve the correct result, so all is good for me now.

Of course, I shouldn't forget to thank you for the wonderful library!

Calculate zoom

It would be awesome to be able to input a number of markers and have the system calculate the correct zoom level, so that all markers would show on the map.

Google Earth display mode integration

Is it in the scope of this project to include the Google Earth API, such as by adding support for easily switching to 3D display of map data and features?

My personal projects recently have included mapping the Google Earth API and browser plugin on top of the standard Google Maps API, with the goal of being able to choose between 2D and 3D display modes. If you think this would be helpful to add to this project, I can work on implementing it.

Can I calculate distanse between two lngltd points on car with routes?

With GMapsAPI i can do this with that way:
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
var legs = response.routes[0].legs;
var totalDistance = legs[0].distance.value;
var METERS_TO_MILES = 0.000621371192;
alert((Math.round( totalDistance * METERS_TO_MILES * 10 ) / 10)+' miles');
}
});

[REQUEST] Tile overlay support with map.overlayMapTypes property

First, I want to compliment you on a great plugin....after working with maps "the hard way" this interface is much appreciated!

I am trying to get a set of custom tile overlays to load underneath the map markers. I tried using the standard v3 API code to do this, but get nothing but errors.

Is there support built into this version of GMaps.js for overlayMapTypes? I'm trying to do something like this (see more at https://developers.google.com/maps/documentation/javascript/maptypes#OverlayMapTypes) :

function CoordMapType(tileSize) {
this.tileSize = tileSize;
}

CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) {
var div = ownerDocument.createElement('div');
div.innerHTML = coord;
div.style.width = this.tileSize.width + 'px';
div.style.height = this.tileSize.height + 'px';
div.style.fontSize = '10';
div.style.borderStyle = 'solid';
div.style.borderWidth = '1px';
div.style.borderColor = '#AAAAAA';
return div;
};

var map;
var chicago = new google.maps.LatLng(41.850033,-87.6500523);

function initialize() {
var mapOptions = {
zoom: 10,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);

// Insert this overlay map type as the first overlay map type at
// position 0. Note that all overlay map types appear on top of
// their parent base map.
map.overlayMapTypes.insertAt(0, new CoordMapType(new google.maps.Size(256, 256)));
}

Printing?

It would be nice if a "print" option could be added...

More examples

How about more examples?
Perhaps tutorials teaching how to combine the functions?
Or how about one that showcases how to use it in conjunction with php and a MYSQL DB with locations, fences etc.?

Uncaught ReferenceError: google is not defined

Hi all,

I'm new in Google API and I have tried to use this library for my site. My JS code is:

    var map;
    $(document).ready(function(){
      map = new GMaps({
        div: '#gmap',
        lat: -12.043333,
        lng: -77.028333
      });
    });

I've got an error: "Uncaught ReferenceError: google is not defined on gmaps.js, line 1015". What can cause it?

Unfortunately, this is probably against the Google Maps API Terms of Service.

https://developers.google.com/maps/terms

10. License Restrictions.

10.2 Restrictions on the Types of Applications that You are Permitted to Build with the Maps API(s).

10.2 (a) No "Wrapping."

You must not create or offer a "wrapper" for the Service, unless you obtain Google's written consent to do so. For example, you are not permitted to: [...] (ii) create a Maps API Implementation that reimplements or duplicates Google Maps/Google Earth. For clarity, you are not "re-implementing or duplicating" Google Maps/Google Earth if your Maps API Implementation provides substantial additional features or content beyond Google Maps/Google Earth, and those additional features or content constitute the primary defining characteristic of your Maps API Implementation.

[REQUEST] Destroy method to avoid memory leaks

Thanks for this library, it looks very nice !

I'm facing an issue with gmap API and all libraries I've found, there is no way to release a map (deleting the map and releasing all the memory used).

I'm working on a one page application that will use invoke a lot of maps, and I have some huge memory leaks by creating and deleting maps (I quickly raise up to 100mb or memory, the chrome/safari garbage collector doesn't do anything about that).

FYI, the gmap3 plugin has a destroy action, but in my tests there is still memory leaks : http://gmap3.net/api/destroy.html

I only found three ways to deal with this issue :

  • creating only one map, and reuse it along the application
  • using bing map which has a Dispose() method, I haven't look at OSM right now.
  • waiting that an incredible library provides a working destroy method :-)

Thanks a lot,

Matthieu

remove marker

Is there any option to remove an added marker?
I would like to have a possibillity to use a checkbox to display and hide certain markers.

Is there a procedure for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.