Source: https://developers.woosmap.com/products/map-api/guides/migration/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Migrating from Google Maps



The Woosmap Map JS API was designed to match Google Maps' class names and method signatures.
If you're only using dynamic maps, markers, and shapes, this migration is essentially a find-and-replace.

## Script Tag & Map Init

```html
<!-- Google Maps -->
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_GOOGLE_KEY&callback=initMap" defer></script>

<!-- Woosmap -->
<script src="https://sdk.woosmap.com/map/map.js?key=YOUR_WOOSMAP_KEY&callback=initMap" defer></script>
```

```js
// Google Maps
const map = new google.maps.Map(document.getElementById("map"), {
  center: { lat: 48.8566, lng: 2.3522 },
  zoom: 13,
});

// Woosmap — same signature, different namespace
const map = new woosmap.map.Map(document.getElementById("map"), {
  center: { lat: 48.8566, lng: 2.3522 },
  zoom: 13,
});
```

All classes follow the same pattern: replace `google.maps` with `woosmap.map`. That applies to `Map`, `Marker`, `InfoWindow`, `Circle`, `Polygon`, `Polyline`, `LatLng`, `LatLngBounds`, and `event.*`.

Two things that aren't a straight swap:

- **`LatLngBounds`** constructor takes `(ne, sw)` — Google uses `(sw, ne)`.
- **`LatLng`** — `lat` and `lng` are properties, not methods. Drop the parentheses: `location.lat` instead of `location.lat()`.

## Map Styling

Woosmap supports the same JSON style format as Google Maps — styles from
[Snazzy Maps](https://snazzymaps.com/) or [Google's style editor](https://mapstyle.withgoogle.com/)
work directly. See the [style reference](/products/map-api/concepts/map-styles/) for the full list
of supported feature types and stylers.

## Static Maps

The Static Map API is where parameter formats actually differ:

```bash
# Google Maps
curl "https://maps.googleapis.com/maps/api/staticmap?center=48.8584,2.2945&zoom=15&size=600x400&key=YOUR_GOOGLE_KEY"

# Woosmap
curl "https://api.woosmap.com/maps/static?lat=48.8584&lng=2.294351&zoom=15&width=600&height=400&key=YOUR_WOOSMAP_KEY"
```

With markers:

```bash
# Google Maps
curl "https://maps.googleapis.com/maps/api/staticmap?center=48.8584,2.2945&zoom=15&size=600x400&markers=color:red|48.8584,2.2945&key=YOUR_GOOGLE_KEY"

# Woosmap
curl "https://api.woosmap.com/maps/static?lat=48.8584&lng=2.294351&zoom=15&width=600&height=400&markers=color:red|48.8584,2.294351&key=YOUR_WOOSMAP_KEY"
```

| Parameter    | Google Maps         | Woosmap                |
| :----------- | :------------------ | :--------------------- |
| Center       | `center=lat,lng`    | `lat=...&lng=...`      |
| Size         | `size=WIDTHxHEIGHT` | `width=...&height=...` |
| Markers      | Same syntax         | Same syntax            |
| Retina       | `scale=2`           | `retina=yes`           |
| Image format | PNG or JPEG         | PNG only               |

Full parameter list: [Static Map API docs](/products/map-static-api/get-started/).

## What Woosmap Doesn't Cover

If your Google Maps integration uses any of these, they'll need a separate solution:

- **Street View** — not available in Woosmap.
- **Traffic, Bicycling, Transit layers** — no map overlay equivalents. Woosmap does support [transit routing](/products/transit-api/route-endpoint/) and [traffic-aware directions](/products/distance-api/features/route/), just not as visual map layers.
- **Elevation API** — not available.
- **AdvancedMarkerElement** — Woosmap uses the traditional `Marker` class, but you can build custom HTML/CSS markers ([example](/js-samples/marker-html-css/)).
